Adaptive method, device and equipment of WiFi country code, medium and product

By detecting the connection status of wireless devices and managing information in frames, adaptively setting WiFi country code and transmission power, the problem of wireless devices being unable to be used normally during cross-border use is solved, and the user experience and device adaptability are improved.

CN119922532APending Publication Date: 2025-05-02HANGZHOU TUYA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510121046.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

When existing wireless devices are used across countries, the WiFi country code and transmission power cannot adapt to the device, which affects the user experience.

Method used

By detecting the connection status of the wireless device and the auxiliary device, it is determined whether there is a matching pre-stored WiFi country code stored. If not stored, the local WiFi country code and transmit power are extracted from the received management frame and set it to the wireless device.

Benefits of technology

It realizes the adaptive operation of wireless devices in different countries, ensures that the equipment can be used normally, improves the user experience, and improves the equipment's adaptability in multiple environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922532A_ABST
    Figure CN119922532A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a WiFi country code adaptive method, device and equipment, a medium and a product, and relates to the technical field of wireless communication of the Internet of Things. The method is applied to the wireless equipment, and comprises the following steps: if the wireless equipment is not connected with auxiliary equipment, judging whether the wireless equipment stores a pre-stored WiFi country code matched with a country in which the wireless equipment is located or not; if the pre-stored WiFi country code is stored, setting the pre-stored WiFi country code and a target transmitting power corresponding to the pre-stored WiFi country code into the wireless device, so that the wireless device operates based on the pre-stored WiFi country code and the target transmitting power; if the local WiFi national code is not stored, extracting the local WiFi national code from the received management frame; and setting the local WiFi country code and the local transmitting power corresponding to the local WiFi country code into the wireless equipment, so that the wireless equipment operates based on the local WiFi country code and the local transmitting power. According to the invention, the use experience of a wireless device user can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of Internet of Things wireless communication technology. More specifically, the embodiments of the present invention relate to a method, device, equipment, medium and product for self-adapting a WiFi country code. Background Art

[0002] This section is intended to provide a background or context to embodiments of the invention that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.

[0003] Wireless devices are currently widely used in the Internet of Things and are distributed all over the world. However, different countries and regions have different requirements for the working channels and transmission power of wireless devices. The working channels and transmission power of wireless devices are usually determined by the country code.

[0004] At present, wireless devices usually have a country's WiFi country code (WiFi Country Code) and the corresponding transmission power of the WiFi country code written into them before leaving the factory. However, if the wireless device enters another country and the WiFi country code and transmission power of the wireless device have not changed, the wireless device will not be able to be used normally, thereby affecting the user experience of the wireless device. Summary of the invention

[0005] In this context, embodiments of the present invention are intended to provide a method, apparatus, device, medium, and product for adapting a WiFi country code.

[0006] In a first aspect of an embodiment of the present invention, a method for adapting a WiFi country code is provided, the method being applied to a wireless device, the method comprising: Detecting the connection status between the wireless device and the auxiliary device to obtain a detection result; If the detection result indicates that the wireless device is not connected to the auxiliary device, determining whether the wireless device stores a pre-stored WiFi country code matching the country where the wireless device is located, and obtaining a first determination result; If the first judgment result indicates that the pre-stored WiFi country code is stored, setting the pre-stored WiFi country code and the target transmission power corresponding to the pre-stored WiFi country code to the wireless device, so that the wireless device operates based on the pre-stored WiFi country code and the target transmission power; If the first determination result indicates that the local WiFi country code is not stored, extracting the local WiFi country code from a received management frame; wherein the management frame is transmitted by a router in the environment where the wireless device is located; The local WiFi country code and the local transmission power corresponding to the local WiFi country code are set in the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power.

[0007] In one embodiment of this implementation, extracting the local WiFi country code from the received management frame includes: Determine the wireless radio frequency mode of the wireless device as 2.4G mode; Based on the 2.4G mode, sending a probe request frame through the first channel of the wireless device; wherein the probe request frame is used to enable a router that receives the probe request frame to feed back a management frame corresponding to the probe request frame; Determine whether the second channel of the wireless device receives the management frame corresponding to the detection request frame to obtain a second determination result; If the second determination result indicates that the second channel receives the management frame, a local WiFi country code is extracted from the management frame.

[0008] In an embodiment of this implementation manner, if the second judgment result indicates that the second channel has not received the management frame, the method further includes: Determine the wireless radio frequency mode of the wireless device as a 5G mode; Based on the 5G mode, sending a probe request frame through the third channel of the wireless device; wherein the probe request frame is used to enable a router that receives the probe request frame to feedback a management frame corresponding to the probe request frame; Determine whether the fourth channel of the wireless device receives the management frame corresponding to the detection request frame to obtain a third determination result; If the third determination result indicates that the fourth channel receives the management frame, a local WiFi country code is extracted from the management frame.

[0009] In an embodiment of this implementation manner, if the third judgment result indicates that the fourth channel has not received the management frame, it includes: Acquire the compliant channel and compliant power pre-stored in the wireless device; The compliance channel and the compliance power are set in the wireless device so that the wireless device operates based on the compliance channel and the compliance power.

[0010] In one embodiment of this implementation manner, the setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device so that the wireless device operates based on the local WiFi country code and the local transmission power includes: Setting the local WiFi country code into the wireless device so that the wireless device operates based on the local WiFi country code; Determine the initial transmission power corresponding to the local WiFi country code; Connecting the wireless device to the router to obtain signal strength indication information received by the router; Adjusting the initial transmit power according to the signal strength indication information to obtain a local transmit power; The local transmit power is set into the wireless device so that the wireless device operates based on the local transmit power.

[0011] In an example of this implementation manner, if the detection result indicates that the wireless device is connected to the auxiliary device, the method further includes: Determining geographic location permission information of the auxiliary device; If the geographic location permission information indicates that the geographic location permission of the auxiliary device is enabled, obtaining, through the auxiliary device, a local WiFi country code corresponding to the geographic location of the auxiliary device and a local transmission power corresponding to the local WiFi country code, and performing the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power; If the geographic location permission information indicates that the geographic location permission of the auxiliary device is closed, determining whether there is a SIM card in the auxiliary device to obtain a fourth determination result; If the fourth judgment result indicates that the SIM card is present in the auxiliary device, obtaining a local WiFi country code corresponding to the geographical location of the auxiliary device and a local transmission power corresponding to the local WiFi country code through the SIM card, and performing the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device so that the wireless device operates based on the local WiFi country code and the local transmission power; If the fourth judgment result indicates that the SIM card does not exist in the auxiliary device, determining whether there is a registered account in the auxiliary device to obtain a fifth judgment result; If the fifth judgment result indicates that the registered account exists in the auxiliary device, the local WiFi country code corresponding to the geographical location of the auxiliary device and the local transmission power corresponding to the local WiFi country code are determined according to the registered account, and the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device is performed so that the wireless device operates based on the local WiFi country code and the local transmission power.

[0012] In a second aspect of the embodiments of the present invention, a device for adapting a WiFi country code is provided, the device being applied to a wireless device, the device comprising: A detection unit, used to detect the connection status between the wireless device and the auxiliary device to obtain a detection result; a judgment unit, configured to judge whether the wireless device stores a pre-stored WiFi country code matching the country where the wireless device is located, and obtain a first judgment result when the detection result indicates that the wireless device is not connected to the auxiliary device; a storage unit, configured to set the pre-stored WiFi country code and the target transmission power corresponding to the pre-stored WiFi country code to the wireless device when the first judgment result indicates that the pre-stored WiFi country code is stored, so that the wireless device operates based on the pre-stored WiFi country code and the target transmission power; an extraction unit, configured to extract the local WiFi country code from the received management frame when the first judgment result indicates that the local WiFi country code is not stored; wherein the management frame is transmitted by a router in the environment where the wireless device is located; The setting unit is used to set the local WiFi country code and the local transmission power corresponding to the local WiFi country code into the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power.

[0013] In a third aspect of an embodiment of the present invention, a computing device is provided, comprising: at least one processor, a memory, and an input-output unit; wherein the memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute any one of the methods described in the first aspect.

[0014] In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which includes instructions, and when the instructions are executed on a computer, the computer executes the method described in any one of the first aspects.

[0015] In a fifth aspect of the embodiments of the present invention, a computer program product is provided, comprising a computer program, which implements any one of the methods in the first aspect when executed by a processor.

[0016] According to the adaptive method, apparatus, device, medium and product of the WiFi country code of the embodiment of the present invention, when the local WiFi country code is not stored in the wireless device, the management frame in the environment where the wireless device is located can be obtained, and the local WiFi country code and the local transmission power corresponding to the local WiFi country code can be extracted from the management frame, and then the local WiFi country code and the local transmission power can be set in the wireless device, so that the wireless device can operate normally based on the local WiFi country code and the local transmission power, thereby improving the user experience of the wireless device user. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which: Figure 1 A schematic diagram of a flow chart of a method for self-adapting a WiFi country code according to an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a device for adapting a WiFi country code according to an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a medium according to an embodiment of the present invention is schematically shown; Figure 4 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is schematically shown.

[0018] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0019] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0020] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0021] According to an embodiment of the present invention, a method, apparatus, device, medium and product for self-adaptation of a WiFi country code are proposed.

[0022] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.

[0023] The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.

[0024] Exemplary Methods Reference below Figure 1 , Figure 1 A schematic diagram of a process flow of a method for adapting a WiFi country code according to an embodiment of the present invention. It should be noted that the embodiments of the present invention can be applied to wireless devices.

[0025] Figure 1 The process of the adaptive method of the WiFi country code provided by an embodiment of the present invention shown includes: Step S101, detecting the connection status between the wireless device and the auxiliary device to obtain a detection result.

[0026] In the embodiment of the present invention, the auxiliary device may be a terminal device such as a mobile phone, a computer, a tablet computer, etc., which is not limited in the embodiment of the present invention. The connection state between the wireless device and the auxiliary device may be WiFi connection, Bluetooth connection or no connection.

[0027] Step S102: If the detection result indicates that the wireless device is not connected to the auxiliary device, it is determined whether the wireless device stores a pre-stored WiFi country code matching the country where the wireless device is located, and a first determination result is obtained.

[0028] In an embodiment of the present invention, the pre-stored WiFi country code can be stored in a flash memory. The pre-stored WiFi country code is a WiFi country code pre-stored in the wireless device. The WiFi country code is a two-letter code used to identify the country or region where the device is located to ensure that the use of the wireless network complies with local laws and regulations.

[0029] Step S103: If the first judgment result indicates that the pre-stored WiFi country code is stored, the pre-stored WiFi country code and the target transmission power corresponding to the pre-stored WiFi country code are set in the wireless device, so that the wireless device operates based on the pre-stored WiFi country code and the target transmission power.

[0030] In an embodiment of the present invention, the method of setting the pre-stored WiFi country code and the pre-stored transmission power corresponding to the pre-stored WiFi country code into the wireless device so that the wireless device operates based on the pre-stored WiFi country code and the pre-stored transmission power may include: Setting the pre-stored WiFi country code into the wireless device so that the wireless device operates based on the pre-stored WiFi country code; Determine an initial pre-stored transmit power corresponding to the pre-stored WiFi country code; Connecting the wireless device to a router in the space where the wireless device is located, and obtaining signal strength indication information received by the router; Adjusting the initial pre-stored transmit power according to the signal strength indication information to obtain the pre-stored transmit power; The pre-stored transmit power is set into the wireless device so that the wireless device operates based on the pre-stored transmit power.

[0031] Among them, by implementing this implementation method, the initial pre-stored transmission power corresponding to the pre-stored WiFi country code can be used, and the signal strength indication information received by the router in the environment where the wireless device is located can be obtained. From the signal strength indication information, the initial pre-stored transmission power can be adjusted to obtain the pre-stored transmission power, so that the obtained pre-stored transmission power can be more matched with the signal strength received by the router, thereby improving the transmission efficiency of the wireless device signal.

[0032] Step S104: if the first judgment result indicates that the local WiFi country code is not stored, extracting the local WiFi country code from the received management frame.

[0033] In the embodiment of the present invention, the management frame is transmitted by a router in the environment where the wireless device is located.

[0034] As an optional implementation, the method of extracting the local WiFi country code from the received management frame in step S104 may include: Determine the wireless radio frequency mode of the wireless device as 2.4G mode; Based on the 2.4G mode, sending a probe request frame through the first channel of the wireless device; wherein the probe request frame is used to enable a router that receives the probe request frame to feed back a management frame corresponding to the probe request frame; Determine whether the second channel of the wireless device receives the management frame corresponding to the detection request frame to obtain a second determination result; If the second determination result indicates that the second channel receives the management frame, a local WiFi country code is extracted from the management frame.

[0035] If the second judgment result indicates that the second channel has not received the management frame, determining the wireless radio frequency mode of the wireless device to be a 5G mode; Based on the 5G mode, sending a probe request frame through the third channel of the wireless device; wherein the probe request frame is used to enable a router that receives the probe request frame to feedback a management frame corresponding to the probe request frame; Determine whether the fourth channel of the wireless device receives the management frame corresponding to the detection request frame to obtain a third determination result; If the third determination result indicates that the fourth channel receives the management frame, a local WiFi country code is extracted from the management frame.

[0036] If the third judgment result indicates that the fourth channel has not received the management frame, obtaining a compliance channel and a compliance power pre-stored in the wireless device; The compliance channel and the compliance power are set in the wireless device so that the wireless device operates based on the compliance channel and the compliance power.

[0037] Among them, by implementing this implementation method, based on the 2.4G mode or the 5G mode, a detection request frame can be sent through the first channel or the third channel of the wireless device, so that the router in the environment where the wireless device is located can receive the detection request, and then the management frame can be fed back based on the received detection request. The wireless device can receive the management frame sent by the router through the second channel or the fourth channel, and the local WiFi country code can be read from the management frame. In addition, in the case where the management frame is not received, the compliance channel and compliance power pre-stored in the wireless device can be set in the wireless device, so that the wireless device can operate normally based on the compliance channel and compliance power, thereby improving the adaptability of the wireless device in any environment.

[0038] In the embodiments of the present invention, the 2.4G mode generally refers to a wireless connection technology using the 2.4 GHz frequency band. Data is transmitted based on the 2.4 GHz wireless frequency band. This frequency band is a universal industrial, scientific, and medical (ISM) frequency band that can be used without authorization. Therefore, many wireless devices choose to work on this frequency band to achieve wireless connection and data transmission within a short distance.

[0039] In the embodiment of the present invention, the 5G mode refers to the working mode supported by the fifth generation mobile communication technology (5th Generation Mobile Networks or 5th Generation Wireless Systems, referred to as 5G).

[0040] In the embodiment of the present invention, the first channel may be subchannels 1 to 11 of the wireless device, the second channel may be subchannels 12 to 14 of the wireless device, the third channel may be subchannels 36 to 64 (bind1 and bind2) of the wireless device, and the fourth channel may be subchannels 100 to 165 (bind3 and bind4) of the wireless device.

[0041] In the embodiment of the present invention, the probe request frame is a management frame in the 802.11 wireless network, which is used by the wireless device to actively scan for available wireless networks. The management frame can be a beacon management frame, which is periodically sent by the router at a certain time interval. Its main purpose is to announce the existence of the wireless network to the outside world and provide relevant information about the network.

[0042] Therefore, the Beacon management frame can be parsed to obtain the country code in the VIEs (Vendor-Specific Information Elements) in the Beacon management frame.

[0043] Step S105: setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code into the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power.

[0044] As an optional implementation manner, step S105 sets the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device so that the wireless device operates based on the local WiFi country code and the local transmission power, which may include: Setting the local WiFi country code into the wireless device so that the wireless device operates based on the local WiFi country code; Determine the initial transmission power corresponding to the local WiFi country code; Connecting the wireless device to the router to obtain signal strength indication information received by the router; Adjusting the initial transmit power according to the signal strength indication information to obtain a local transmit power; The local transmit power is set into the wireless device so that the wireless device operates based on the local transmit power.

[0045] Among them, by implementing this implementation method, the initial transmission power corresponding to the local WiFi country code can be used, and the signal strength indication information received by the router that transmits the management frame can be obtained. The initial transmission power can be adjusted from the signal strength indication information to obtain the local transmission power, so that the obtained local transmission power can be more matched with the signal strength received by the router, thereby improving the transmission efficiency of the wireless device signal.

[0046] In the embodiment of the present invention, the received signal strength indicator (RSSI) information of the router is an indicator for measuring the strength of wireless signal reception. The RSSI value is usually expressed as a negative value, and its unit is dBm (decibel milliwatt). The closer the RSSI value is to 0, the stronger the signal strength is; conversely, the smaller the RSSI value (the larger the negative value), the weaker the signal strength is.

[0047] As an optional implementation manner, if the detection result indicates that the wireless device is connected to the auxiliary device, the method may further include: Determining geographic location permission information of the auxiliary device; If the geographic location permission information indicates that the geographic location permission of the auxiliary device is enabled, obtaining, through the auxiliary device, a local WiFi country code corresponding to the geographic location of the auxiliary device and a local transmission power corresponding to the local WiFi country code, and performing the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power; If the geographic location permission information indicates that the geographic location permission of the auxiliary device is closed, determining whether there is a SIM card in the auxiliary device to obtain a fourth determination result; If the fourth judgment result indicates that the SIM card is present in the auxiliary device, obtaining a local WiFi country code corresponding to the geographical location of the auxiliary device and a local transmission power corresponding to the local WiFi country code through the SIM card, and performing the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device so that the wireless device operates based on the local WiFi country code and the local transmission power; If the fourth judgment result indicates that the SIM card does not exist in the auxiliary device, determining whether there is a registered account in the auxiliary device to obtain a fifth judgment result; If the fifth judgment result indicates that the registered account exists in the auxiliary device, the local WiFi country code corresponding to the geographical location of the auxiliary device and the local transmission power corresponding to the local WiFi country code are determined according to the registered account, and the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device is performed so that the wireless device operates based on the local WiFi country code and the local transmission power.

[0048] Among them, by implementing this implementation method, when the wireless device is connected to the auxiliary device, the local WiFi country code and the local transmission power can be obtained through the auxiliary device, thereby improving the reliability of obtaining the local WiFi country code and the local transmission power.

[0049] In the embodiment of the present invention, after the wireless device obtains the local WiFi country code and the local transmission power, the local WiFi country code and the local transmission power can be stored in the memory of the wireless device, so as to directly use the local WiFi country code and the local transmission power in the current area later.

[0050] The present invention can improve the user experience of wireless device users. In addition, the present invention can also improve the adaptability of wireless devices in any environment. In addition, the present invention can also improve the transmission efficiency of wireless device signals. In addition, the present invention can also improve the reliability of obtaining local WiFi country codes and local transmission power.

[0051] Exemplary Devices After introducing the method of the exemplary embodiment of the present invention, next, refer to Figure 2 An adaptive device for WiFi country code according to an exemplary embodiment of the present invention is described. The device is applied to a wireless device, and the device includes: The detection unit 201 is used to detect the connection status between the wireless device and the auxiliary device to obtain a detection result; A judgment unit 202, configured to, when the detection result indicates that the wireless device is not connected to the auxiliary device, judge whether the wireless device stores a pre-stored WiFi country code matching the country where the wireless device is located, to obtain a first judgment result; The storage unit 203 is configured to set the pre-stored WiFi country code and the target transmission power corresponding to the pre-stored WiFi country code to the wireless device when the first judgment result indicates that the pre-stored WiFi country code is stored, so that the wireless device operates based on the pre-stored WiFi country code and the target transmission power; An extraction unit 204 is configured to extract the local WiFi country code from the received management frame when the first judgment result indicates that the local WiFi country code is not stored; wherein the management frame is transmitted by a router in the environment where the wireless device is located; The setting unit 205 is configured to set the local WiFi country code and the local transmission power corresponding to the local WiFi country code into the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power.

[0052] The present invention can improve the user experience of wireless device users. In addition, the present invention can also improve the adaptability of wireless devices in any environment. In addition, the present invention can also improve the transmission efficiency of wireless device signals. In addition, the present invention can also improve the reliability of obtaining local WiFi country codes and local transmission power.

[0053] Exemplary Media After introducing the method and apparatus of the exemplary embodiment of the present invention, next, reference is made to Figure 3 For a description of a computer-readable storage medium according to an exemplary embodiment of the present invention, please refer to Figure 3, the computer-readable storage medium shown is a CD 30, on which a computer program (i.e., a program product) is stored. When the computer program is executed by the processor, each step recorded in the above method implementation is implemented, for example, the connection status of the wireless device and the auxiliary device is detected to obtain a detection result; if the detection result indicates that the wireless device is not connected to the auxiliary device, it is determined whether the wireless device stores a pre-stored WiFi country code matching the country where the wireless device is located to obtain a first judgment result; if the first judgment result indicates that the pre-stored WiFi country code is stored, the pre-stored WiFi country code and the pre-stored WiFi country code are stored. The target transmission power corresponding to the country code is set in the wireless device, so that the wireless device operates based on the pre-stored WiFi country code and the target transmission power; if the first judgment result indicates that the local WiFi country code is not stored, the local WiFi country code is extracted from the received management frame; wherein the management frame is transmitted by a router in the environment where the wireless device is located; the local WiFi country code and the local transmission power corresponding to the local WiFi country code are set in the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power; the specific implementation method of each step is not repeated here.

[0054] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0055] Exemplary Computing Devices After introducing the method, apparatus and medium of the exemplary embodiments of the present invention, next, reference is made to Figure 4 A computing device for adapting WiFi country codes according to an exemplary embodiment of the present invention.

[0056] Figure 4 A block diagram of an exemplary computing device 40 suitable for implementing embodiments of the present invention is shown, and the computing device 40 may be a computer system or a server. Figure 4 The computing device 40 shown is only an example and should not bring any limitation to the functionality and scope of use of the embodiments of the present invention.

[0057] like Figure 4As shown, the components of the computing device 40 may include, but are not limited to: one or more processors or processing units 401 , a system memory 402 , and a bus 403 connecting different system components (including the system memory 402 and the processing unit 401 ).

[0058] The computing device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computing device 40, including volatile and non-volatile media, removable and non-removable media.

[0059] The system memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 4021 and / or cache memory 4022. The computing device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the ROM 4023 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 is not shown in the Figure 4 As shown in FIG. 4 , a disk drive for reading and writing a removable non-volatile disk (e.g., a “floppy disk”) and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. System memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0060] A program / utility 4025 having a set (at least one) of program modules 4024 may be stored, for example, in system memory 402, and such program modules 4024 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 4024 generally perform the functions and / or methods of the embodiments described herein.

[0061] The computing device 40 may also communicate with one or more external devices 404 (e.g., a keyboard, a pointing device, a display, etc.). Such communication may be performed via an input / output (I / O) interface 405. Furthermore, the computing device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 406. Figure 4 As shown, the network adapter 406 communicates with other modules (such as the processing unit 401, etc.) of the computing device 40 via the bus 403. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with computing device 40 .

[0062] The processing unit 401 executes various functional applications and data processing by running the program stored in the system memory 402, for example, detecting the connection status between the wireless device and the auxiliary device to obtain a detection result; if the detection result indicates that the wireless device is not connected to the auxiliary device, determining whether the wireless device stores a pre-stored WiFi country code matching the country where the wireless device is located to obtain a first judgment result; if the first judgment result indicates that the pre-stored WiFi country code is stored, setting the pre-stored WiFi country code and the target transmission power corresponding to the pre-stored WiFi country code to the wireless device, so that the wireless device operates based on the pre-stored WiFi country code and the target transmission power; if the first judgment result indicates that the local WiFi country code is not stored, extracting the local WiFi country code from the received management frame; wherein the management frame is transmitted by a router in the environment where the wireless device is located; setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power. The specific implementation of each step will not be repeated here. It should be noted that, although several units / modules or sub-units / sub-modules of the adaptive device for WiFi country code are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0063] In the description of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0064] 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.

[0065] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. 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. For example, 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 through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0066] 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.

[0067] In addition, each functional unit in each embodiment of the present invention 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.

[0068] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0069] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

[0070] In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0071] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

Claims

1. A method for adaptive WiFi country code, characterized in that: The method is applied to a wireless device, and the method comprises: Detecting the connection status between the wireless device and the auxiliary device to obtain a detection result; If the detection result indicates that the wireless device is not connected to the auxiliary device, determining whether the wireless device stores a pre-stored WiFi country code matching the country where the wireless device is located, and obtaining a first determination result; If the first judgment result indicates that the pre-stored WiFi country code is stored, setting the pre-stored WiFi country code and the target transmission power corresponding to the pre-stored WiFi country code to the wireless device, so that the wireless device operates based on the pre-stored WiFi country code and the target transmission power; If the first determination result indicates that the local WiFi country code is not stored, extracting the local WiFi country code from a received management frame; wherein the management frame is transmitted by a router in the environment where the wireless device is located; The local WiFi country code and the local transmission power corresponding to the local WiFi country code are set in the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power.

2. The adaptive method for WiFi country code according to claim 1, characterized in that: The extracting the local WiFi country code from the received management frame includes: Determine the wireless radio frequency mode of the wireless device as 2.4G mode; Based on the 2.4G mode, sending a probe request frame through the first channel of the wireless device; wherein the probe request frame is used to enable a router that receives the probe request frame to feed back a management frame corresponding to the probe request frame; Determine whether the second channel of the wireless device receives the management frame corresponding to the detection request frame to obtain a second determination result; If the second determination result indicates that the second channel receives the management frame, a local WiFi country code is extracted from the management frame.

3. The adaptive method for WiFi country code according to claim 2, characterized in that: If the second determination result indicates that the second channel has not received the management frame, the method further includes: Determine the wireless radio frequency mode of the wireless device as a 5G mode; Based on the 5G mode, sending a probe request frame through the third channel of the wireless device; wherein the probe request frame is used to enable a router that receives the probe request frame to feedback a management frame corresponding to the probe request frame; Determine whether the fourth channel of the wireless device receives the management frame corresponding to the detection request frame to obtain a third determination result; If the third determination result indicates that the fourth channel receives the management frame, a local WiFi country code is extracted from the management frame.

4. The adaptive method for WiFi country code according to claim 3, characterized in that: If the third judgment result indicates that the fourth channel has not received the management frame, the method includes: Acquire the compliant channel and compliant power pre-stored in the wireless device; The compliance channel and the compliance power are set in the wireless device so that the wireless device operates based on the compliance channel and the compliance power.

5. The adaptive method for WiFi country code according to claim 1, characterized in that: The step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code into the wireless device so that the wireless device operates based on the local WiFi country code and the local transmission power includes: Setting the local WiFi country code into the wireless device so that the wireless device operates based on the local WiFi country code; Determine the initial transmission power corresponding to the local WiFi country code; Connecting the wireless device to the router to obtain signal strength indication information received by the router; Adjusting the initial transmit power according to the signal strength indication information to obtain a local transmit power; The local transmit power is set into the wireless device so that the wireless device operates based on the local transmit power.

6. The adaptive method for WiFi country code according to claim 1, characterized in that: If the detection result indicates that the wireless device is connected to the auxiliary device, the method further includes: Determining geographic location permission information of the auxiliary device; If the geographic location permission information indicates that the geographic location permission of the auxiliary device is enabled, obtaining, through the auxiliary device, a local WiFi country code corresponding to the geographic location of the auxiliary device and a local transmission power corresponding to the local WiFi country code, and performing the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power; If the geographic location permission information indicates that the geographic location permission of the auxiliary device is closed, determining whether there is a SIM card in the auxiliary device to obtain a fourth determination result; If the fourth judgment result indicates that the SIM card is present in the auxiliary device, obtaining a local WiFi country code corresponding to the geographical location of the auxiliary device and a local transmission power corresponding to the local WiFi country code through the SIM card, and performing the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device so that the wireless device operates based on the local WiFi country code and the local transmission power; If the fourth judgment result indicates that the SIM card does not exist in the auxiliary device, determining whether there is a registered account in the auxiliary device to obtain a fifth judgment result; If the fifth judgment result indicates that the registered account exists in the auxiliary device, the local WiFi country code corresponding to the geographical location of the auxiliary device and the local transmission power corresponding to the local WiFi country code are determined according to the registered account, and the step of setting the local WiFi country code and the local transmission power corresponding to the local WiFi country code to the wireless device is performed so that the wireless device operates based on the local WiFi country code and the local transmission power.

7. An adaptive device for WiFi country code, characterized in that: The device is applied to a wireless device, and comprises: A detection unit, used to detect the connection status between the wireless device and the auxiliary device to obtain a detection result; a judgment unit, configured to judge whether the wireless device stores a pre-stored WiFi country code matching the country where the wireless device is located, and obtain a first judgment result when the detection result indicates that the wireless device is not connected to the auxiliary device; a storage unit, configured to set the pre-stored WiFi country code and the target transmission power corresponding to the pre-stored WiFi country code to the wireless device when the first judgment result indicates that the pre-stored WiFi country code is stored, so that the wireless device operates based on the pre-stored WiFi country code and the target transmission power; an extraction unit, configured to extract the local WiFi country code from the received management frame when the first judgment result indicates that the local WiFi country code is not stored; wherein the management frame is transmitted by a router in the environment where the wireless device is located; The setting unit is used to set the local WiFi country code and the local transmission power corresponding to the local WiFi country code into the wireless device, so that the wireless device operates based on the local WiFi country code and the local transmission power.

8. A computing device, comprising: at least one processor, memory, and input-output unit; The memory is used to store a computer program, and the processor is used to call the computer program stored in the memory to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.