Method and device for controlling tuning of WIFI antenna, and terminal equipment

By obtaining the WIFI country code or base station positioning information of the terminal device, determining the working frequency band and selecting the matching antenna tuning branch, the problem of antenna impedance matching of 802.11ah equipment is solved, and adaptive tuning and efficient transceiver performance are achieved.

CN119676692APending Publication Date: 2025-03-21SHANGHAI SUMI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411758625.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

How to adaptively adjust the WIFI antenna impedance of an 802.11ah communication device to obtain WIFI antenna performance matching its operating frequency, especially in the frequency band differences in different countries.

Method used

By obtaining the WIFI country code or base station positioning information built into the terminal device, determine the corresponding operating frequency band, and select the matching antenna tuning branch to connect to the WIFI antenna, or scan the available wireless access points in the global operating frequency band to update the antenna frequency band.

Benefits of technology

Adaptive tuning of terminal equipment antennas is realized, the antenna transmission and reception performance is improved, and the frequency band differences are adapted to different countries and regions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676692A_ABST
    Figure CN119676692A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for controlling tuning of a WIFI antenna and terminal equipment, and the method is applied to the terminal equipment, and comprises the steps: if the terminal equipment does not support a cellular communication system, or supports the cellular communication system but is not inserted with an SIM card, or is inserted with the SIM card but is not resident in a network, and the terminal equipment is provided with a built-in WIFI country code, obtaining the built-in country code; selecting an antenna tuning branch matched with the working frequency band corresponding to the country code to be connected with an antenna, and searching whether available wireless access points exist around the working frequency band corresponding to the country code; if the available wireless access point is searched, obtaining a country code of the wireless access point; and updating the built-in country code by using the country code of the wireless access point, and selecting the antenna tuning branch matched with the corresponding working frequency band. According to the invention, self-adaptive tuning can be carried out on the WIFI antenna of the equipment, and the transceiving performance of the antenna is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of WIFI technology, and in particular to a method and device for controlling WIFI antenna tuning, and terminal equipment. Background Art

[0002] Antenna tuning refers to adjusting the impedance of the antenna to match the impedance between the transceiver and the antenna, so that the antenna can achieve maximum radiation power at the operating frequency.

[0003] 802.11ah, also known as Wi-Fi HaLow, is a WIFI standard designed to provide longer transmission distance and better penetration, mainly for Internet of Things (IoT) devices. 802.11ah operates in the unlicensed frequency band below 1GHz, but the specific frequency bands allocated to 802.11 for use vary from country to country. For example, in China, the frequency band allowed for 802.11ah devices is 755-787MHz; in Europe, the frequency band for 802.11ah is 862-870MHz; in the United States, it is 902-931MHz.

[0004] How to adaptively adjust the WiFi antenna impedance of 802.11ah communication equipment to obtain WiFi antenna performance that matches its operating frequency is an urgent problem to be solved. Summary of the invention

[0005] One of the purposes of the present invention is to overcome the deficiencies in the prior art and to provide a method and device for controlling WIFI antenna tuning and a terminal device.

[0006] The technical solution provided by the present invention is as follows:

[0007] A method for controlling WIFI antenna tuning, comprising: if a terminal device does not support a cellular communication standard, or supports a cellular communication standard but has no SIM card inserted, or has a SIM card inserted but is not stationed on a network, and the terminal device is provided with a built-in WIFI country code, then obtaining the built-in WIFI country code of the terminal device;

[0008] Select an antenna tuning branch that matches the working frequency band corresponding to the built-in WIFI country code and connect it to the WIFI antenna, and search for available wireless access points around on the working frequency band corresponding to the WIFI country code;

[0009] If an available wireless access point is found, the WIFI country code of the wireless access point is obtained;

[0010] The built-in WIFI country code is updated with the WIFI country code of the wireless access point, and an antenna tuning branch matching the working frequency band corresponding to the WIFI country code of the wireless access point is selected to connect it to the WIFI antenna of the terminal device.

[0011] In some embodiments, the method further includes: if no available wireless access point is found, selecting other antenna tuning branches to be connected to the WIFI antenna, and continuing to scan in other frequency bands until an available wireless access point is found.

[0012] In some embodiments, it also includes:

[0013] If the terminal device does not support the cellular communication standard, or supports the cellular communication standard but no SIM card is inserted, or has a SIM card inserted but is not connected to the network, and does not have a built-in WIFI country code, then obtain the global working frequency band that can be used by the WIFI standard supported by the terminal device;

[0014] Scan the global working frequency bands until an available wireless access point is found in one of the frequency bands;

[0015] The WIFI country code of the wireless access point is obtained, and an antenna tuning branch matching the working frequency band corresponding to the WIFI country code of the wireless access point is selected to connect the antenna to the WIFI antenna of the terminal device.

[0016] In some embodiments, it also includes:

[0017] If the terminal device supports the cellular communication standard and has been stationed on the network, the base station positioning information is obtained;

[0018] Determine the location area of ​​the terminal device according to the base station positioning information;

[0019] Determine the WIFI country code corresponding to the location area of ​​the terminal device;

[0020] Select an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code and connect it to the WIFI antenna of the terminal device.

[0021] In some embodiments, the base station positioning information includes a base station cell identifier.

[0022] In some embodiments, one end of the antenna tuning switch is controlled by the RF module or baseband module of the terminal device to be connected to an antenna tuning branch matching the working frequency band, and the other end of the antenna tuning switch is connected to the WIFI antenna.

[0023] The present invention also provides a device for controlling WIFI antenna tuning, comprising:

[0024] An acquisition module, used for acquiring the built-in WIFI country code of the terminal device if the terminal device does not support the cellular communication standard, or supports the cellular communication standard but no SIM card is inserted, or a SIM card is inserted but not stationed on the network, and the terminal device is provided with a built-in WIFI country code;

[0025] A tuning module is used to select an antenna tuning branch that matches the working frequency band corresponding to the built-in WIFI country code and connect to the WIFI antenna;

[0026] A search module is used to search for available wireless access points in the surrounding area on the working frequency band corresponding to the WIFI country code; if an available wireless access point is found, the WIFI country code of the wireless access point is obtained; and the built-in WIFI country code is updated with the WIFI country code of the wireless access point;

[0027] The tuning module is also used to select an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code of the wireless access point, so that it is connected to the WIFI antenna of the terminal device.

[0028] In some embodiments, the search module is further used to select other antenna tuning branches to connect to the WIFI antenna if no available wireless access point is found, and continue scanning in other frequency bands until an available wireless access point is found.

[0029] The present invention also provides a terminal device, comprising a device for controlling WIFI antenna tuning according to any of the above embodiments.

[0030] The present invention also provides a terminal device, comprising:

[0031] Memory for storing computer programs;

[0032] A processor is used to implement the method for controlling WIFI antenna tuning of any of the above embodiments when running a computer program.

[0033] The method and device for controlling WIFI antenna tuning and the terminal device provided by the present invention can at least bring the following beneficial effects:

[0034] 1. The present invention provides a variety of methods for determining the working frequency band of a terminal device. The current working frequency band of the terminal device can be determined based on the positioning information of the base station / the built-in WIFI country code / the scanning of the global working frequency band, and has a wide range of application scenarios.

[0035] 2. The present invention selects a suitable antenna tuning branch to connect to the antenna according to the current working frequency band of the terminal device, adaptively adjusts the antenna impedance of the terminal device, and improves the antenna's transceiver performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The following will explain the preferred implementation mode in a clear and understandable manner with reference to the accompanying drawings, and further explain the above-mentioned characteristics, technical features, advantages and implementation methods of a method and device for controlling WIFI antenna tuning and a terminal device.

[0037] Figure 1 to Figure 3 is a flow chart of an embodiment of a method for controlling WIFI antenna tuning of the present invention;

[0038] Figure 4 is a schematic structural diagram of an embodiment of a terminal device of the present invention;

[0039] Figure 5 It is a structural schematic diagram of an embodiment of a device for controlling WIFI antenna tuning of the present invention;

[0040] Figure 6 is a structural schematic diagram of another embodiment of a terminal device of the present invention;

[0041] Figure 7 It is a structural schematic diagram of another embodiment of a terminal device of the present invention. DETAILED DESCRIPTION

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.

[0043] In order to simplify the drawings, only the parts related to the present invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".

[0044] One embodiment of the present invention, as Figure 1 to Figure 3 As shown, a method for controlling WIFI antenna tuning is used in a terminal device, comprising:

[0045] Step S100: If the terminal device supports the cellular communication standard and has resided on the network, then the base station positioning information is obtained, and the location area of ​​the terminal device is determined according to the base station positioning information;

[0046] Step S110 determines the WIFI country code corresponding to the location area of ​​the terminal device;

[0047] Step S120 selects an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code, and connects it to the WIFI antenna of the terminal device.

[0048] Specifically, if the terminal device (such as a smart phone) supports both cellular communication and WIFI, when the device is turned on and connected to the mobile network, the base station positioning information of the mobile network can be obtained, such as the base station cell identification information (such as the LTE cell global identification ECGI, the 5G cell global identification NCGI, the tracking area identification TAI, etc.). According to the base station cell identification information, the location area of ​​the current device can be determined, and the WIFI country code of the current device location can be determined according to the built-in relationship table between the location area and the WIFI country code. Further, according to the built-in correspondence table between the WIFI country code and the working frequency band, the working frequency band corresponding to the current WIFI country code can be determined, and then the antenna tuning branch matching the working frequency band is selected from the existing antenna tuning branches and connected to the WIFI antenna, so as to achieve impedance matching of the antenna and obtain better antenna transceiver performance.

[0049] For example, the terminal device supports both cellular communication and WIFI standard 802.11ah. Assuming that the current device is in China according to the base station cell identification information, its current WIFI country code is determined to be CN. The frequency band allowed for use by 802.11ah in China is 755-787 MHz. The antenna tuning branch matching the frequency band is selected to connect to the WIFI antenna.

[0050] A few countries allow 802.11ah to use multiple frequency bands, that is, the WIFI country code corresponds to multiple frequency bands. For example, Singapore supports both the 800MHz frequency band (866-869MHz) and the 900MHz frequency band (920-925MHz). In this case, the frequency bands corresponding to the WIFI country code can be traversed in turn, and the antenna tuning branch matching the frequency band can be selected to connect to the antenna. The terminal device searches in each frequency band and can select the frequency band that can search for an available wireless access point AP as the working frequency band in the current location area. If the terminal device can search for AP in multiple frequency bands, the frequency band with the strongest signal can be selected as the working frequency band. The antenna tuning branch corresponding to the working frequency band is selected as the final tuning branch.

[0051] The above method is quick and easy to implement. However, for terminal devices that only support WIFI, or support cellular communication but no SIM card is inserted, or have a SIM card inserted but not resident, the above method cannot be used to tune the antenna, so the following method is introduced.

[0052] Step S200: If the terminal device does not support the cellular communication standard, or supports the cellular communication standard but has no SIM card inserted, or has a SIM card inserted but is not stationed on the network, and the terminal device has a built-in WIFI country code, then the built-in WIFI country code of the terminal device is obtained;

[0053] Step S210 selects an antenna tuning branch that matches the working frequency band corresponding to the built-in WIFI country code and connects it to the WIFI antenna of the terminal device, and searches for an available wireless access point AP around on the working frequency band corresponding to the built-in WIFI country code; if no available wireless access point AP is found, execute step S220; otherwise, execute step S230;

[0054] Step S220 selects other antenna tuning branches to be connected to the WIFI antenna, and continues scanning in other frequency bands to search for available wireless access points around until an available AP is found;

[0055] Step S230: Obtain the WIFI country code of the wireless access point AP;

[0056] Step S240 updates the built-in WIFI country code of the terminal device with the WIFI country code of the AP, and finally selects an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code of the AP to connect it to the WIFI antenna of the terminal device.

[0057] Specifically, some terminal devices have a preset WIFI country code in their engineering code, which is embedded in the software during the compilation process. For example, some products are shipped to a certain area, so the WIFI country code of the product's destination is placed in the product's engineering code when it is shipped. In this way, the antenna can be quickly tuned according to the working frequency band corresponding to the built-in WIFI country code, and then scan on the working frequency band corresponding to the built-in WIFI country code to search for wireless access points AP around.

[0058] A wireless access point (AP) is a wireless network access device, such as a router, that allows terminal devices (such as laptops, smartphones, tablets, etc.) to connect to a wired network or create a wireless local area network (WLAN). Wireless network access devices transmit network signals to the surrounding space, and terminal devices search for nearby network signals in the space and connect to them so that they can access the network for data transmission and communication.

[0059] If an AP is found, the terminal device can obtain the AP's WiFi country code from the Beacon frame (beacon frame) periodically sent by the AP, or obtain the AP's WiFi country code from the connection established with the AP.

[0060] If the terminal device fails to search for an AP within the preset time, it switches to another antenna tuning branch to connect to the WIFI antenna and continues scanning on other frequency bands (not the working frequency band corresponding to the built-in WIFI country code) until an available AP is found. If there are multiple antenna tuning branches, they are traversed in sequence and scanned on the corresponding frequency bands until an available AP is found in a certain frequency band.

[0061] The WIFI country code of the wireless access point AP is obtained, and the built-in WIFI country code of the terminal device is updated with the WIFI country code of the AP, and finally an antenna tuning branch matching the working frequency band corresponding to the WIFI country code of the AP is selected to connect it to the WIFI antenna of the terminal device.

[0062] For example, suppose the built-in WIFI country code of the terminal device is the United Kingdom, and the corresponding working frequency band is 800MHz, and then the device is actually sent to the United States (working frequency band is 900MHz). In the case where the user has not inserted a SIM card and cannot obtain the WIFI country code through positioning information, the scheme of steps S200 to S240 is adopted. First, the antenna tuning branch selects the working frequency band 800MHz corresponding to the built-in WIFI country code, and scans in the 800MHz frequency band. If the surrounding APs cannot be searched, switch to other tuning branches, such as 900MHz, and scan in the 900MHz frequency band to search for surrounding APs. Then obtain the AP's WIFI country code, and use the AP's WIFI country code to update the built-in WIFI country code of the terminal device. In the future, after the device is powered off and restarted, it can quickly tune the antenna according to the built-in WIFI country code.

[0063] Step S240 may be further refined as follows: Check whether the AP's WIFI country code is consistent with the built-in WIFI country code of the terminal device. If consistent, the antenna tuning branch determined according to the built-in WIFI country code is the target tuning branch. If inconsistent, the terminal device determines the working frequency band of the AP according to the AP's WIFI country code, selects a matching antenna tuning branch according to the working frequency band, and connects it to the antenna, and at the same time updates the built-in WIFI country code with the AP's WIFI country code, so that the built-in WIFI country code is consistent with the WIFI country code of the current location area.

[0064] If there is no built-in WIFI country code, or the built-in WIFI country code has been lost, you can use the following methods:

[0065] Step S300 obtains the global country code stored in the non-volatile random access memory NVRAM in the terminal device.

[0066] The global country code is a special WIFI country code, such as global, which corresponds to the working frequency band of the WIFI standard supported by the terminal device that can be used worldwide. The global working frequency band is obtained according to the global country code. Taking 802.11ah as an example, the working frequency bands corresponding to the global country code include the 700MHz band (755-787MHz), the 800MHz band (862-870MHz) and the 900MHz band (902-931MHz).

[0067] Step S310 scans the global operating frequency bands until an available wireless access point is found in one of the frequency bands.

[0068] Step S320 obtains the WIFI country code of the wireless access point, selects an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code of the wireless access point, and connects it to the WIFI antenna of the terminal device.

[0069] Specifically, NVRAM is a non-volatile random access memory that can keep data from being lost when there is no power. In this embodiment, NVRAM stores the global country code. The global operating frequency band that can be used by the WIFI standard supported by the terminal device is determined according to the global country code.

[0070] The terminal device traverses the global working frequency bands and searches for available APs around until it finds one. During the search, the RF module of the terminal device must work in conjunction with the antenna tuning switch to actively scan nearby APs. For example, if the RF module is currently searching the 800MHz frequency band, the antenna tuning switch must also switch to the tuning branch of the 800MHz frequency band. This type of scan is a global working frequency band scan, which consumes a lot of resources and is relatively time-consuming, but is reliable and will not miss any APs.

[0071] If an AP is found, the terminal device can determine the working frequency band information of the AP according to the WiFi country code of the AP, select a matching antenna tuning branch according to the working frequency band information, and connect it to the antenna.

[0072] In steps S120, S240, and S320, an antenna tuning branch matching the working frequency band is selected to connect to the WIFI antenna of the terminal device, including:

[0073] One end of the antenna tuning switch is controlled by the RF module or baseband module of the terminal device to be connected to the antenna tuning branch matching the working frequency band, and the other end of the antenna tuning switch is connected to the WIFI antenna.

[0074] like Figure 4As shown, a terminal device includes a baseband module, a radio frequency module, an antenna tuner Tuner and a WIFI antenna ANT. The antenna tuner Tuner includes: a first tuning branch, an antenna tuning switch and a second tuning branch. One end of the antenna tuning switch is connected to the antenna tuning branch through the GPIO port of the radio frequency module of the terminal device, and the other end of the antenna tuning switch is connected to the WIFI antenna ANT. The first tuning branch includes a first inductor L1; the second tuning branch includes a second inductor L2.

[0075] Figure 4 Only two tuning branches are shown, and multiple tuning branches can be set as needed. Taking the 802.11ah standard as an example, it can be used for 755-787MHz, 862-870MHz and 902-931MHz frequency bands, so three tuning branches can be set inside the terminal device to adapt to more frequency bands. Figure 4 It is shown that the antenna tuning switch is controlled by the radio frequency module, but the tuning switch can also be controlled by the baseband module.

[0076] This embodiment provides a variety of methods (1. Determine the WIFI country code of the terminal device's location by obtaining the base station positioning information, thereby determining the corresponding working frequency band; 2. Determine the working frequency band based on the built-in WIFI country code; 3. Determine the working frequency band by obtaining the global country code stored in NVRAM and scanning the AP in combination with the global working frequency band.) Determine the working frequency band of the terminal device, and adaptively adjust the antenna impedance of the terminal device according to the working frequency band information to match it with the working frequency band, thereby improving the antenna's transceiver performance. The first method is used first, followed by the second, and finally the third, which not only meets the requirements of fast tuning, but also realizes adaptive antenna tuning in extreme cases, and has a wide range of application scenarios.

[0077] One embodiment of the present invention, as Figure 5 As shown, a device 100 for controlling WIFI antenna tuning includes:

[0078] The acquisition module 110 is used to obtain the base station positioning information if the terminal device supports the cellular communication standard and has been stationed on the network, and determine the location area of ​​the terminal device according to the base station positioning information; determine the WIFI country code corresponding to the location area of ​​the terminal device;

[0079] The tuning module 130 is used to select an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code, so that it is connected to the WIFI antenna of the terminal device.

[0080] In one embodiment, the acquisition module 110 is also used to obtain the built-in WIFI country code of the terminal device if the terminal device does not support the cellular communication standard, or supports the cellular communication standard but no SIM card is inserted, or a SIM card is inserted but not resident, and the terminal device has a built-in WIFI country code.

[0081] The tuning module 130 is also used to select an antenna tuning branch that matches the working frequency band corresponding to the built-in WIFI country code to be connected to the WIFI antenna.

[0082] The search module 120 is also used to search for available wireless access points AP in the surrounding area on the working frequency band corresponding to the built-in WIFI country code. If no available wireless access point AP is found, other antenna tuning branches are selected to be connected to the WIFI antenna, and scanning is continued in other frequency bands until an available AP is found; if an available wireless access point is found, the WIFI country code of the wireless access point is obtained; and the built-in WIFI country code of the terminal device is updated with the WIFI country code of the AP.

[0083] The tuning module 130 is also used to finally select an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code of the AP, so that it is connected to the WIFI antenna of the terminal device.

[0084] In one embodiment, the acquisition module 110 is also used to obtain the global country code stored in the non-volatile random access memory NVRAM in the terminal device if the terminal device does not support the cellular communication standard, or supports the cellular communication standard but no SIM card is inserted, or a SIM card is inserted but not resident, and the terminal device does not have a built-in WIFI country code, or the built-in WIFI country code has been lost, and obtain the corresponding global operating frequency band according to the global country code.

[0085] The WIFI country code set in NVRAM is the global country code, which corresponds to the working frequency band that can be used worldwide by the WIFI standard supported by the terminal device.

[0086] The search module 120 is further used to scan the global working frequency bands until an available wireless access point is found in one of the frequency bands;

[0087] The tuning module 130 is also used to obtain the WIFI country code of the wireless access point, select an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code of the wireless access point, and connect it to the WIFI antenna of the terminal device.

[0088] This embodiment provides multiple methods for determining the operating frequency band of the terminal device, and adaptively adjusts the antenna impedance of the terminal device according to the operating frequency band information to match the operating frequency band, thereby improving the antenna's transceiver performance.

[0089] It should be noted that the embodiment of the device for controlling WIFI antenna tuning provided by the present invention and the embodiment of the method for controlling WIFI antenna tuning provided above are based on the same inventive concept and can achieve the same technical effect. Therefore, other specific contents of the embodiment of the device for controlling WIFI antenna tuning can refer to the contents of the embodiment of the method for controlling WIFI antenna tuning provided above.

[0090] One embodiment of the present invention, as Figure 6 As shown, a terminal device includes a device 100 for controlling WIFI antenna tuning according to the aforementioned embodiment.

[0091] The terminal device also includes a baseband module 200, a radio frequency module 300 and an antenna 400 for WIFI communication.

[0092] In one embodiment, the terminal device further comprises a cellular communication module.

[0093] One embodiment of the present invention, as Figure 7 As shown, a terminal device includes:

[0094] A memory 10 for storing a computer program 20;

[0095] The processor 30 is configured to implement the method for controlling WIFI antenna tuning described in any of the above embodiments when running the computer program 20.

[0096] The memory 10 may be any internal storage unit and / or external storage device capable of storing data and programs. For example, the memory 10 may be a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash memory card.

[0097] As needed, the processor 30 can be a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a general-purpose processor or other logic devices, etc.

[0098] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims

1. A method for controlling WIFI antenna tuning, applied to a terminal device, characterized in that: include: If the terminal device does not support the cellular communication standard, or supports the cellular communication standard but has no SIM card inserted, or has a SIM card inserted but is not resident, and the terminal device has a built-in WIFI country code, then obtain the built-in WIFI country code of the terminal device; Select an antenna tuning branch that matches the working frequency band corresponding to the built-in WIFI country code and connect it to the WIFI antenna, and search for available wireless access points around on the working frequency band corresponding to the WIFI country code; If an available wireless access point is found, the WIFI country code of the wireless access point is obtained; The built-in WIFI country code is updated with the WIFI country code of the wireless access point, and an antenna tuning branch matching the working frequency band corresponding to the WIFI country code of the wireless access point is selected to connect to the WIFI antenna of the terminal device.

2. The method for controlling WIFI antenna tuning according to claim 1, characterized in that: Also includes: If no available wireless access point is found, other antenna tuning branches are selected to be connected to the WIFI antenna, and scanning is continued in other frequency bands until an available wireless access point is found.

3. The method for controlling WIFI antenna tuning according to claim 1, characterized in that: Also includes: If the terminal device does not support the cellular communication standard, or supports the cellular communication standard but has no SIM card inserted, or has a SIM card inserted but is not connected to the network, and does not have a built-in WIFI country code, then obtain the global operating frequency band that can be used by the WIFI standard supported by the terminal device; Scanning the global operating frequency band until an available wireless access point is found in one of the frequency bands; The WIFI country code of the wireless access point is obtained, and an antenna tuning branch matching the working frequency band corresponding to the WIFI country code of the wireless access point is selected to connect the antenna tuning branch to the WIFI antenna of the terminal device.

4. The method for controlling WIFI antenna tuning according to claim 1, characterized in that: Also includes: If the terminal device supports the cellular communication standard and has resided on the network, obtaining base station positioning information; Determine the location area of ​​the terminal device according to the base station positioning information; Determine the WIFI country code corresponding to the location area of ​​the terminal device; An antenna tuning branch matching the working frequency band corresponding to the WIFI country code is selected to connect to the WIFI antenna of the terminal device.

5. The method for controlling WIFI antenna tuning according to claim 4, characterized in that: The base station positioning information includes a base station cell identifier.

6. The method for controlling WIFI antenna tuning according to any one of claims 1 to 5, characterized in that: One end of the antenna tuning switch is controlled by the radio frequency module or the baseband module of the terminal device to be connected to the antenna tuning branch matching the working frequency band, and the other end of the antenna tuning switch is connected to the WIFI antenna.

7. A device for controlling WIFI antenna tuning, applied to a terminal device, characterized in that: include: An acquisition module, used for acquiring the built-in WIFI country code of the terminal device if the terminal device does not support the cellular communication standard, or supports the cellular communication standard but has no SIM card inserted, or has a SIM card inserted but is not stationed on the network, and the terminal device is provided with a built-in WIFI country code; A tuning module, used for selecting an antenna tuning branch matching the working frequency band corresponding to the built-in WIFI country code and connecting it to the WIFI antenna; A search module, configured to search for available wireless access points in the surrounding area on a working frequency band corresponding to the WIFI country code; if an available wireless access point is found, the WIFI country code of the wireless access point is obtained; and the built-in WIFI country code is updated with the WIFI country code of the wireless access point; The tuning module is also used to select an antenna tuning branch that matches the working frequency band corresponding to the WIFI country code of the wireless access point, so that it is connected to the WIFI antenna of the terminal device.

8. The device for controlling WIFI antenna tuning according to claim 7, characterized in that: The search module is also used to select other antenna tuning branches to be connected to the WIFI antenna if no available wireless access point is found, and continue scanning in other frequency bands until an available wireless access point is found.

9. A terminal device, characterized in that: The invention comprises a device for controlling WIFI antenna tuning as described in claim 7 or 8.

10. A terminal device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method for controlling WIFI antenna tuning as claimed in any one of claims 1 to 6 when running the computer program.