CN115243344A - Channel scanning method and electronic equipment - Google Patents

Channel scanning method and electronic equipment Download PDF

Info

Publication number
CN115243344A
CN115243344A CN202210877495.0A CN202210877495A CN115243344A CN 115243344 A CN115243344 A CN 115243344A CN 202210877495 A CN202210877495 A CN 202210877495A CN 115243344 A CN115243344 A CN 115243344A
Authority
CN
China
Prior art keywords
channel
access point
channels
scanning
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210877495.0A
Other languages
Chinese (zh)
Inventor
夏洪成
赵秋焕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202210877495.0A priority Critical patent/CN115243344A/en
Publication of CN115243344A publication Critical patent/CN115243344A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a channel scanning method and electronic equipment, wherein the method comprises the following steps: scanning a first set of channels in response to a first instruction; wherein the first channel set comprises a part of all channels supported by a wireless communication module of the electronic equipment; if the first access point is detected, stopping scanning the first channel set; the first access point is used for the wireless communication module to establish wireless connection with first equipment; the first device corresponds to the first access point.

Description

Channel scanning method and electronic equipment
Technical Field
The present application relates to the field of wireless communication technologies, and in particular, to a channel scanning method and an electronic device.
Background
In practical applications, in order to shorten the time for the electronic device to access the wireless local area network, a method of shortening a scanning time interval is generally adopted to perform channel scanning. Such scanning strategies can easily result in excessive power consumption for channel scanning by the electronic device.
Disclosure of Invention
Based on the above problems, embodiments of the present application provide a channel scanning method and an electronic device.
The technical scheme provided by the embodiment of the application is as follows:
the embodiment of the application provides a channel scanning method, which comprises the following steps:
scanning a first set of channels in response to a first instruction; wherein the first set of channels includes a portion of all channels supported by a wireless communication module of the electronic device;
if the first access point is detected, stopping scanning the first channel set; the first access point is used for the wireless communication module to establish wireless connection with first equipment; the first device corresponds to the first access point.
In some embodiments, the method further comprises:
scanning a second set of channels in response to a second instruction; wherein the second set of channels includes the all channels.
In some embodiments, the time of execution of the scanning of the first set of channels is less than the time of execution of the scanning of the second set of channels.
In some embodiments, the first time interval is less than the second time interval; the first time interval comprises an interval time of two adjacent scans of the first channel set; the second time interval comprises an interval time between two adjacent scans of the second set of channels.
In some embodiments, a channel in the first set of channels corresponds to a third access point; the third access point comprises a historical access point of the electronic device; the third access point comprises the first access point.
In some embodiments, the first set of channels is associated with an identity of a set of identities.
In some embodiments, the method further comprises:
obtaining first information; the first information comprises screen brightness information of the electronic equipment and/or position information of the electronic equipment;
if the first information meets a first condition, generating the first instruction; wherein the first condition comprises a change in the first information.
In some embodiments, the method further comprises:
obtaining second information; wherein the second information at least comprises the number of channels in the first channel set and/or detection result information of the first access point;
if the second information meets a second condition, generating the second instruction; wherein the second condition comprises that the number of channels in the first channel set is 0 and/or the detection result information indicates that the first access point is not detected.
In some embodiments, the method further comprises:
if a second access point is detected, stopping scanning the second channel set; the second access point is used for the wireless communication module to establish wireless connection with second equipment; the second equipment corresponds to the second access point;
and acquiring the channel information of the second access point, and updating the first channel set based on the channel information of the second access point.
An embodiment of the present application further provides an electronic device, including:
a wireless communication module to scan a first set of channels in response to a first instruction; wherein the first set of channels includes a portion of all channels supported by a wireless communication module of the electronic device;
the wireless communication module is further configured to stop scanning the first channel set if the first access point is detected; the first access point is used for the wireless communication module to establish wireless connection with first equipment; the first device corresponds to the first access point.
Drawings
Fig. 1 is a schematic flowchart of a channel scanning method according to an embodiment of the present application;
fig. 2 is another schematic flow chart of a channel scanning method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a channel scanning method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of updating a first channel set according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In practical applications, the speed of the mobile electronic device with a wireless communication function when the mobile electronic device is connected to the wireless local area network is slow, for example, the speed of the mobile terminal accessing Wi-Fi is slow, because the time interval for the mobile terminal to perform Wi-Fi channel scanning is long. Such channel scanning methods directly result in too slow an access to the wireless local area network.
Based on the above problems, the embodiments of the present application provide a channel scanning method and an electronic device. In the channel scanning method provided in the embodiment of the present application, after responding to the first instruction, the scanned first channel set is a partial channel of all channels supported by the wireless communication module of the electronic device, and once the first access point is detected, the scanning of the first channel set is stopped, and a wireless connection is established with the first device through the first access point. By narrowing the channel scanning range, the time length of channel scanning can be shortened, and the channel scanning power consumption of the electronic device can be reduced. By scanning partial channels, less time is consumed and fast scanning is achieved.
Fig. 1 is a schematic flowchart of a channel scanning method according to an embodiment of the present application. As shown in fig. 1, the process may include steps 101 to 102:
step 101, in response to a first instruction, scanning a first set of channels.
Wherein the first channel set comprises a part of all channels supported by a wireless communication module of the electronic equipment.
In one embodiment, an electronic device may comprise any device capable of wireless communication; for example, the electronic device may include a mobile terminal device, such as a smart phone or a smart wearable device; illustratively, the electronic device may comprise a computer device.
In one embodiment, the wireless communication module may include an embedded module capable of performing channel scanning, channel access, and data Transmission according to a wireless local area network communication standard, and the embedded module may further include a Protocol stack of a wireless network Protocol and a Transmission Control Protocol/Internet Protocol (TCP/IP); illustratively, the wireless communication module may include a Wi-Fi module or a Bluetooth (BT) module, which is not limited in this embodiment.
In one embodiment, the number of the wireless communication modules arranged in the electronic device may be multiple, and the communication system of each wireless communication module may be different.
In one embodiment, the first set of channels may include random partial channels of all channels supported by a wireless communication module of the electronic device, such as n channels scanned first by a Wi-Fi module; for example, the signal-to-noise ratio of n channels in the first set of channels may be higher than the signal-to-noise ratio threshold, that is, the signal-to-noise ratio of a channel in the first set of channels may be higher than the signal-to-noise ratio of other channels except for the first set of channels in all channels; for example, the first channel set may include the first n channels arranged by channel names for all channels. Wherein N is an integer greater than or equal to 1 and less than N, and N is the number of channels in all channels.
In one embodiment, the number of channels in the first channel set may be adjusted according to a remaining power state and a power supply state of the electronic device; for example, if the remaining power state indicates that the remaining power of the electronic device is greater than the power threshold, or the power supply state indicates that the electronic device is in the external power supply state and the external power supply is in the stable power supply state, the number of channels in the first channel set may be the first number; for example, if the remaining power state indicates that the remaining power is less than or equal to the power threshold, or the power supply state indicates that the electronic device is in a state where the battery provides power, the number of channels in the first channel set may be the second number; illustratively, the first number may be greater than the second number.
In one embodiment, the first instruction may be self-triggered by the electronic device; for example, the first instruction may be generated after the electronic device detects a partial channel scanning operation input by a user; illustratively, the first instruction may include an opening of a partial channel scan switch.
For example, after responding to the first instruction, each channel in the first channel set may be scanned according to a channel scanning time interval originally existing in the electronic device.
Step 102, if the first access point is detected, stopping scanning the first channel set.
The first access point is used for establishing wireless connection between the wireless communication module and the first equipment; the first device corresponds to the first access point.
Illustratively, if the first access point is not detected, the scanning for the first set of channels may continue.
In one embodiment, the first device may comprise a device capable of providing wireless routing and/or wireless access functionality; illustratively, the first device may comprise a route switching access all-in-one device or a pure access point device, etc.; illustratively, the first device may comprise a Wi-Fi router; for example, the first device may further include a device capable of providing a hot spot sharing function, such as a smart phone, a tablet computer, a notebook computer, and the like having the hot spot sharing function.
In one embodiment, the first access point may include an access point for the wireless communication module to access a wireless local area network provided by the first device; illustratively, the type of the first access point may be related to the first device; illustratively, the name of the first access point may be set and managed by the first device; illustratively, the first device may provide at least one access point.
As can be seen from the above, in the channel scanning method provided in this embodiment of the application, in response to the first instruction, the first channel set is scanned, and if the first access point is detected, the scanning of the first channel set is stopped, and the first channel set includes a part of channels in all channels supported by the wireless communication module of the electronic device, where the first access point is used for the wireless communication module to establish a wireless connection with the first device, and the first device corresponds to the first access point.
Therefore, the channel scanning method provided by the embodiment of the application can effectively shorten the scanning time of the channel scanning of the wireless communication module and reduce the channel scanning power consumption of the wireless communication module by reducing the channel scanning range of the wireless communication module.
Based on the foregoing embodiment, the channel scanning method provided in the embodiment of the present application may further include the following operations:
in response to a second instruction, a second set of channels is scanned.
Wherein the second set of channels includes all channels.
In one embodiment, the second instructions include instructions to scan all channels detected by the electronic device; illustratively, the second instructions may include instructions detected by the electronic device to cease scanning the first set of channels; for example, the instruction to scan all channels and the instruction to stop scanning the first set of channels may be triggered by a user of the electronic device.
For example, when scanning the second channel set, channels in the second channel set except the first channel set may be preferentially scanned, and then the first channel set may be scanned.
For example, the time interval for scanning the second set of channels may be an interval originally in the electronic device.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, in response to the second instruction, a second channel set can also be scanned, and the second channel set includes all channels supported by the wireless communication module of the electronic device.
Therefore, in the channel scanning method provided by the embodiment of the application, in response to the first instruction, a first channel set, which is a part of all channels supported by the wireless communication module of the electronic device, can be scanned, and in response to the second instruction, a second channel set, which is a part of all channels supported by the wireless communication module of the electronic device, can be scanned, so that a diversified channel scanning mode is realized, and the channel scanning of the electronic device is more flexible; in addition, the two channel scanning ranges and the two corresponding channel scanning modes are combined together, so that the channel scanning stability and the channel access stability of the electronic equipment can be improved, and the risk that the electronic equipment cannot be accessed to the wireless local area network is reduced.
Based on the foregoing embodiment, in the channel scanning method provided in the embodiment of the present application, the execution time for scanning the first channel set is less than the execution time for scanning the second channel set.
For example, the execution time may be related to the number of channels actually scanned; for example, the scanning time of each channel is 200 milliseconds, and if the first channel set includes 5 channels, the execution time for scanning the first channel set may be 1 second; for example, if the first access point is detected by scanning the first 1-2 channels in the first channel set, the speed of accessing the wireless local area network by the electronic device is faster, and for example, with the Wi-Fi protocol, including a frequency band of a fifth Generation Mobile Communication technology (5 g), all channels supported by the Wi-Fi module of the electronic device, that is, the second channel set is about 30, and at this time, the execution time for scanning the second channel set may be about 6 seconds.
In an embodiment, the execution time for scanning the first channel set may include a preset time corresponding to scanning all channels in the first channel set; for example, the execution time for scanning the first channel may include a preconfigured time corresponding to m times of scanning all channels in the first channel set; for example, scanning the first set of channels m times may constitute an overall process of scanning the first set of channels; wherein m may be an integer greater than or equal to 1; illustratively, the value of m may be adjusted according to the state of remaining electric quantity and/or the state of electric energy supply of the electronic device; for example, the value of m may also be determined according to the number of channels in the first channel set, for example, the value of m may be inversely proportional to the number of channels in the first channel set; the embodiments of the present application do not limit this.
In an embodiment, the execution time for scanning the second channel set may include a preset time corresponding to scanning all channels in the second channel set; for example, the execution time for scanning the second channel may include a preconfigured time corresponding to k times of scanning all channels in the second channel set; for example, scanning the second set of channels k times may constitute an overall process of scanning the second set of channels; wherein k is an integer greater than or equal to 1; for example, the value of k may be adjusted according to the remaining power state and/or the power supply state of the electronic device; illustratively, the value of k may also be determined according to the number of channels in the second channel set; illustratively, the value of k may be inversely proportional to the number of channels in the second set of channels; the embodiments of the present application do not limit this.
For example, after the execution time for scanning the first set of channels is over, the electronic device may generate a second instruction and automatically trigger scanning the second set of channels; for example, after the execution time for scanning the first channel set is finished, whether to scan the first channel set again may be determined based on a user selection or a channel scanning policy.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, the execution time for scanning the first channel set is less than the execution time for scanning the second channel set. Therefore, the reference time for controlling the execution time for scanning the first channel is provided, and the reasonable control on the execution time for scanning the first channel can be realized, so that the channel scanning effect of the electronic equipment is guaranteed.
Based on the foregoing embodiment, in the channel scanning method provided in the embodiment of the present application, the first time interval is smaller than the second time interval; the first time interval comprises the interval time of two adjacent scans of the first channel set; the second time interval includes an interval between two adjacent scans of the second set of channels.
In one embodiment, the first time interval may include a time interval between an h-th complete scan of all channels in the first channel set to an h + 1-th complete scan of all channels in the first channel set; wherein h is an integer greater than or equal to 1.
In one embodiment, the second time interval may include a time interval between the h-th full scan of all channels in the second set of channels to the h + 1-th full scan of all channels in the second set of channels; wherein h is an integer greater than or equal to 1.
In one embodiment, the first time interval and the second time interval may be fixed; for example, the first time interval and the second time interval may be adjusted or changed according to an actual channel scanning condition, for example, when the electronic device detects that the signal-to-noise ratio of the current network environment gradually changes from a first value to a second value, and the first value is higher than the second value, that is, when the signal-to-noise ratio of the current network environment gradually decreases, the first time interval and the second time interval may be shortened according to the decrease of the signal-to-noise ratio, so as to increase a scanning speed of the electronic device, so that the electronic device can quickly access the wireless local area network.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, the first time interval is smaller than the second time interval, and the first time interval includes a time interval of scanning the first channel set twice, and the second time interval includes a time interval of scanning the second channel set twice.
Therefore, in the channel scanning method provided by the embodiment of the application, a part of channels in all channels supported by the wireless communication module are scanned at a smaller time interval, so that the scanning time of the electronic device for the part of channels can be shortened, and the process of scanning the first channel set is accelerated; and the second time interval for scanning the second channel set is greater than the first time interval, so that the power consumption of the electronic equipment in the process of scanning the second channel set can be reduced.
Based on the foregoing embodiment, in the channel scanning method provided in the embodiment of the present application, each channel in the first channel set corresponds to the third access point.
Wherein the third access point comprises a history access point of the electronic device; the third access point comprises the first access point.
For example, channels in the second set of channels other than the first set of channels may have no historical access points corresponding thereto.
In one embodiment, the third access point may be pre-stored in an access point list of the electronic device; for example, the access point information in the access point list may be determined based on historical channel scans and historical access information of the electronic device.
For example, the historical access information may be determined by the electronic device based on historical information of successful access to the wireless local area network; for example, the historical access information may be determined based on a filtering or filtering of historical information of successful accesses of the electronic device to the wireless local area network; for example, the filtering or filtering operation may be triggered by a user of the electronic device, or may be executed by the electronic device based on a network security policy, which is not limited in this embodiment of the application.
For example, in the case that the wireless communication module is a Wi-Fi, the third Access Point may include a saved Wi-Fi hotspot or a Wi-Fi Access Point (AP), and in general, the AP and the Wi-Fi channel are in a one-to-one correspondence relationship, and the Wi-Fi channel corresponding to the historical AP may be the first channel set.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, each channel in the first set of channels corresponds to a third access point, and the third access point includes a history access point of the electronic device. Therefore, when the electronic equipment scans any channel in the first channel set, the wireless local area network can be accessed through the third access point, so that the efficiency of accessing the wireless local area network by the electronic equipment is improved, and the time of accessing the wireless local area network by the electronic equipment is shortened.
Based on the foregoing embodiment, in the channel scanning method according to the embodiment of the present application, the first channel set is associated with the identifier in the identifier set.
In one embodiment, the set of identities may include at least one identity; for example, the identifiers in the identifier set may be preset; for example, the identifiers in the identifier set may be adjusted according to information such as usage scenarios, locations, and personal habits of the user of the electronic device.
For example, the identifiers in the identifier set may include scene identifiers, such as an office scene, a home scene, a factory scene, a campus scene, a public transportation scene, and the like; for example, the scene identification may be determined by the electronic device in response to the scene information input by the user, or may be determined by the electronic device analyzing the environmental information of the location where the electronic device is located.
For example, the identifiers in the identifier set may include location identifiers, where the location identifiers may include names or geographic coordinates of locations where the electronic devices are located, where the names of the locations may include home, unit, hospital, school, and the like, and the geographic coordinates may include latitude and longitude, base station identifier, city name, street number, and the like.
For example, the first channel set may include at least one set including at least one channel, for example, the first channel set may include a first set and a second set, where the first set and the second set may each include at least one channel, and each channel may have a corresponding historical access point; for example, the identifiers corresponding to different sets in the first channel set may be different, for example, the first set may correspond to a scene identifier, the second set may correspond to a location identifier, and for example, the first set may correspond to a home in the location identifier, and the second set may correspond to a school in the location identifier.
In one embodiment, the correspondence between the sets in the first set of channels and the identifiers may be set by a user or an electronic device; for example, the electronic device may match the position of the access point corresponding to the channel in the first channel set with the position corresponding to the base station identifier of the access station accessed by the electronic device, so as to establish a corresponding relationship between the base station identifier and the access point, and then, in combination with the corresponding relationship between the access point and the channel, establish a corresponding relationship between the base station identifier and the access point, and the channel.
For example, the correspondence between the base station identifier and the access point may be stored in a table of a database; for example, the database may be stored in a memory space of the electronic device; for example, the correspondence between the base station identities and the access points in the table can be as follows: < CID1, (AP 11, AP12, AP13 \8230;) and < CID2, (AP 21, AP22, AP23 \8230;), etc. Wherein CID1 and CID2 may be identifiers of the first base station and the second base station, respectively; the AP11, the AP12 and the AP13 \8230maycomprise the names of historical access points of the electronic equipment in the signal coverage range of the first base station; AP21, AP22 and AP23 \8230mayinclude the names of historical access points of the electronic device within the signal coverage of the second base station.
For example, in the process of scanning the first channel set by the electronic device, the base station identifier of the current access base station of the electronic device may be first obtained, then based on the matching relationship between the base station identifier of the current access base station and the base station identifier in the correspondence relationship between the base station identifier stored in the electronic device and the access point, the historical access point corresponding to the current access base station is determined, and the channel associated with the historical access point corresponding to the current access base station is preferentially scanned, so as to accelerate the channel scanning and access speed of the electronic device.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, the first channel set is associated with at least an identifier in the identifier set. Therefore, the classification and summarization of each channel in the first channel set based on the identification are realized, so that the channel classification in the first channel set is more clear; moreover, in the process of scanning the first channel set by the electronic device, the channels can be scanned in a targeted manner based on the identifiers in the identifier set, so that the channel scanning speed is increased, and the channel scanning time is shortened.
Based on the foregoing embodiment, the channel scanning method provided in the embodiment of the present application may further include the following operations:
and acquiring first information, and generating a first instruction if the first information meets a first condition.
The first information comprises screen brightness information of the electronic equipment and/or position information of the electronic equipment; the first condition includes a change in the first information.
For example, if the first information does not satisfy the first condition, the first instruction may not be generated.
In one embodiment, the screen brightness information of the electronic device may include a current brightness of a display screen of the electronic device; for example, the location information of the electronic device may include a base station identifier of an access base station of the electronic device or a real-time location obtained through a Global Positioning System (GPS).
For example, the first information satisfies the first condition, which may include that a display screen of the electronic device is switched from an unlit state to a lit state, for example, the electronic device is switched from a power-off state to a power-on state, or is switched from a sleep state to an operating state, and the electronic device may start an access procedure of the wireless local area network, so as to generate the first instruction.
For example, the first information satisfies a first condition, which may include that the electronic device has changed location information, such as the electronic device has moved from the signal coverage of the first base station to the signal coverage of the second base station, and the electronic device may generate a first instruction to initiate a channel scanning operation in the signal coverage of the second base station. For example, the procedure for scanning the first channel set based on the base station identifier may be as described in the foregoing embodiments, and is not described herein again.
For example, the first condition may further include that the wireless connection mode of the electronic device is changed, such as the electronic device starts a wireless local area network access mode, such as the signal strength of a wireless local area network to which the electronic device is currently connected is lower than a strength threshold, or the electronic device disconnects the wireless connection with the current wireless local area network, and so on.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, when the screen brightness information of the electronic device and/or the location information of the electronic device changes, the first instruction can be automatically generated, so that the first instruction can be automatically and intelligently generated, and the automation and the intelligent degree of scanning the first channel set are further improved.
Based on the foregoing embodiment, the channel scanning method provided in the embodiment of the present application may further include the following steps:
obtaining second information; and if the second information meets a second condition, generating a second instruction.
The second information at least comprises the number of channels in the first channel set and/or detection result information of the first access point; the second condition includes that the number of channels in the first set of channels is 0 and/or the detection result information indicates that the first access point is not detected.
For example, if the second information does not satisfy the second condition, the second instruction may not be generated.
In an embodiment, the number of channels in the first channel set is 0, which may include that the first channel set exists but the first channel set does not include a historical access channel, and may also include that the first channel set is empty.
In an embodiment, the detecting that the first access point is not detected may include scanning an end of the first channel set, and the electronic device cannot access an access point corresponding to a channel in the first channel set, for example, the electronic device cannot obtain a wireless channel resource in the first channel set, and thus cannot detect and access the first access point, or the electronic device can obtain a wireless channel resource in the first channel set, but cannot detect and access the first access point, for example, a name and/or a password of the first access point is changed, so that the electronic device cannot access, and further, for example, an access policy of the first device corresponding to the first access point is changed.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, after the number of channels in the first channel set and/or the access point detection information are obtained, if the number of channels in the first channel set is 0 and/or the first access point is not detected, the second instruction is generated, so that when the scanning of the first channel set is finished and the result of scanning the first channel set indicates that the wireless local area network cannot be accessed, the second instruction can be automatically generated, and the electronic device is triggered to automatically scan the second channel set. Therefore, the scanning of the second channel set is triggered through the second instruction, the access probability of the wireless local area network of the electronic equipment can be greatly improved, the stability of the wireless local area network of the electronic equipment is improved, the second instruction can be automatically generated in real time when the scanning of the first channel set fails, the automatic generation of the second instruction and the automatic intelligent execution of the scanning of the second channel set are also realized, and the intelligent level of the channel scanning process of the electronic equipment is improved.
Fig. 2 is another schematic flow chart of a channel scanning method according to an embodiment of the present disclosure.
As shown in fig. 2, the channel scanning method may include a first scanning procedure 201, and a second scanning procedure 202; wherein the first scanning procedure 201 may include scanning a first set of channels; the second scanning procedure 202 may include scanning a second set of channels.
For example, the first channel set may include a channel set determined by the electronic device based on a base station identity of a currently accessed base station; exemplarily, the electronic device may scan the first set of channels at a scan cycle of 1s and at an execution time of 9 s; if the number of channels in the first channel set is 0 or the first access point is not detected, a second instruction may be generated and the process is switched to the second scanning process 202; illustratively, during execution of the second scanning procedure 202, the electronic device may scan the second set of channels with a scanning period of 5s, with an execution time of more than 9s, such as 100s.
Illustratively, if the first access point or the second access point is detected in the first scanning process 201 or the second scanning process 202, the channel scanning operation is stopped.
For example, if a channel and/or an access point corresponding to a base station identifier of a currently accessed base station is not detected in the storage space of the electronic device, the second scanning process 202 may be directly performed, and if a second access point is scanned, the second scanning process 202 is terminated.
For example, the electronic device may flexibly switch between the first scanning process 201 and the second scanning process 202 based on a change state of the base station identifier of the currently accessed base station and whether a channel and/or an access point corresponding to the base station identifier of the currently accessed base station exists in a storage space of the electronic device, so as to improve the wlan access performance of the electronic device.
Fig. 3 is a schematic view of another flow of a channel scanning method according to an embodiment of the present application, and as shown in fig. 3, the flow may include:
step 301, starting a first timer, and setting N =0.
For example, a processor or a wireless communication module of the electronic device may start a first timer and set N =0; for example, the duration of the first timer may be the execution time for scanning the first channel set, such as 10s; for example, the value range of N may be determined according to the scanning interval in combination with the execution time for scanning the first channel set, for example, in the case that the scanning interval is 1s, the value range of N may be 0 to 9.
Step 302, determining whether the first timer is over time.
For example, the processor or the wireless communication module of the electronic device may determine whether the first timer has expired; if the first timer is overtime, go to step 303; if the first timer has not timed out, go to step 304.
And step 303, setting N =0.
For example, the processor or the wireless communication module of the electronic device may set N =0, and may also kill the first timer; illustratively, after step 303 ends, steps 305 through 307 may be performed.
And step 304, judging whether the current base station identification is stored.
For example, the processor or the wireless communication module of the electronic device may determine whether the memory space of the electronic device stores the current base station identifier; for example, it may be determined whether a current base station identifier is included in a table of correspondence between a base station identifier stored in the electronic device and a channel or an access point; for example, the current base station identification may include an identification of a base station currently accessed by the electronic device.
If the current base station identifier is stored, step 308 may be executed, and if the base station identifier is not stored, step 303 may be executed.
Step 305, starting a second timer.
For example, the processor or wireless communication module of the electronic device may start the second timer; illustratively, the timeout time of the second timer may be 100s.
Step 306, scanning the second set of channels.
For example, the processor or wireless communication module of the electronic device may scan the second set of channels, such as scanning each channel of the second set of channels with a scan period of 5 s.
Step 307, judging whether a second access point is detected.
For example, the processor or the wireless communication module of the electronic device may determine whether a second access point is detected, and if the second access point is not detected, execute step 301 to switch to a scanning state for scanning the first channel set; if a second access point is detected, step 311 is executed.
And step 308, judging whether N is less than or equal to 9.
For example, the processor or the wireless communication module of the electronic device may determine whether N is less than or equal to 9; if N is less than or equal to 9, step 309 may be performed, and if N is greater than 9, step 303 may be performed.
Step 309, scanning the first channel set, and setting N auto-increment.
For example, a processor or wireless communication module of the electronic device may scan a first set of channels and set N increments; illustratively, scanning the first set of channels includes scanning channels corresponding to the current base station identification, i.e., scanning partial channels of all channels supported by the wireless communication module of the electronic device.
Step 310, determining whether the first access point is detected.
For example, the processor or the wireless communication module of the electronic device may determine whether the first access point is detected, if the first access point is detected, step 311 is executed, and if the first access point is not detected, step 302 is executed to continue to perform the partial channel scanning operation.
Step 311, the connection status is set to the connected status.
For example, the processor or the wireless communication module of the electronic device may set the connection state to the connected state. After step 311 is completed, step 312 may be performed.
And step 312, ending.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, through the first timer, the second timer, and the judgment of various conditions in the channel scanning method, the electronic device can be freely and flexibly switched between partial channel scanning and full channel scanning, so that the efficiency of accessing the electronic device to the wireless local area network can be greatly improved.
Based on the foregoing embodiment, the channel scanning method provided in the embodiment of the present application may further include a flow shown in fig. 4, where fig. 4 is a schematic flowchart of the flow for updating the first channel set provided in the embodiment of the present application, and as shown in fig. 4, the flow may include steps 401 to 402:
step 401, if the second access point is detected, the scanning of the second channel set is terminated.
The second access point is used for establishing wireless connection between the wireless communication module and the second equipment; the second device corresponds to the second access point.
Illustratively, if a second access point is not detected, scanning for a second set of channels may continue.
Illustratively, the type and function of the second device may be similar to those of the first device, and will not be described herein again.
Step 402, obtaining channel information of the second access point, and updating the first channel set based on the channel information of the second access point.
In one embodiment, the channel information of the second access point may include at least one of a frequency band, a channel number, a channel capacity, and a channel bandwidth of a channel corresponding to the second access point.
Illustratively, updating the first set of channels may be implemented based on:
matching channel information in the first channel set based on the channel information of the second access point, and if a channel corresponding to the channel information of the second access point, such as a first channel, exists in the first channel set, acquiring configuration information of the second access point, and modifying access point information corresponding to the first channel based on the configuration information of the second access point; in this case, the first channel in the first channel set may be configured with the second access point, but the second device reconfigures or changes the second access point information, so that the electronic device cannot access the second access point when scanning the first channel set, and further, the access point information corresponding to the first channel may be updated in the above manner; for example, the reconfiguration or change of the second access point information by the second device may be actively triggered by the second device, or passively triggered by the second device based on the configuration of a technician or a user; for example, the reconfiguration or change of the second access point information by the second device may include modifying a name and/or an access password of the second access point.
If there is no channel corresponding to the channel information of the second access point, for example, the second channel, in the first channel set, the second access point information and the channel information of the second access point may be added to the first channel set, and the channels in the first channel set to which the second access point information and the channel information of the second access point are added may be classified and integrated based on the identification set.
As can be seen from the above, in the channel scanning method provided in the embodiment of the present application, if the second access point is detected, scanning of the second channel set is terminated, channel information of the second access point is acquired, and the first channel set is updated based on the channel information of the second access point; the second access point is used for the wireless communication module to establish connection with the second equipment; the second device corresponds to the second access point.
Therefore, according to the channel scanning method provided by the embodiment of the application, after the channel information corresponding to the access point detected in the whole channel scanning process is acquired, the first channel set can be updated based on the channel information, so that the dynamic updating of the channels in the first channel set is realized, the storage state of the channels in the first channel set is consistent with the wireless local area network access state of the electronic equipment, and the accuracy of the channel access state in the first channel set is improved; and after the first channel set is updated, in the process of scanning the first channel set next time, the efficiency of scanning the first channel set can be improved, so that the time for scanning the channels of the electronic equipment is further shortened.
Based on the foregoing embodiments, an embodiment of the present application further provides an electronic device 5, fig. 5 is a schematic structural diagram of the electronic device 5 provided in the embodiment of the present application, and as shown in fig. 5, the electronic device may include a wireless communication module 501; wherein:
a wireless communication module 501, configured to scan a first set of channels in response to a first instruction; wherein the first channel set comprises a part of all channels supported by a wireless communication module of the electronic equipment;
the wireless communication module 501 is further configured to stop scanning the first channel set if the first access point is detected; the first access point is used for establishing wireless connection between the wireless communication module and the first equipment; the first device corresponds to the first access point.
In some embodiments, the wireless communication module 501 is configured to scan a second set of channels in response to a second instruction; wherein the second set of channels includes all channels.
In some embodiments, the execution time to scan the first set of channels is less than the execution time to scan the second set of channels.
In some embodiments, the first time interval is less than the second time interval; the first time interval comprises the interval time of scanning the first channel set twice; the second time interval comprises an interval time between two adjacent scans of the second set of channels.
In some embodiments, the channels in the first set of channels correspond to a third access point; the third access point comprises a history access point of the electronic device; the third access point comprises the first access point.
In some embodiments, the first set of channels is associated with an identity of a set of identities.
In some embodiments, a wireless communication module 501 for obtaining first information; the first information comprises screen brightness information of the electronic equipment and/or position information of the electronic equipment;
a wireless communication module 501, configured to generate a first instruction if the first information meets a first condition; wherein the first condition includes a change in the first information.
In some embodiments, a wireless communication module 501 for obtaining second information; the second information at least comprises the number of channels in the first channel set and/or detection result information of the first access point;
the wireless communication module 501 is configured to generate a second instruction if the second information satisfies a second condition; wherein the second condition comprises that the number of channels in the first channel set is 0 and/or the detection result information indicates that the first access point is not detected.
In some embodiments, the wireless communication module 501 is configured to terminate scanning the second set of channels if the second access point is detected; the second access point is used for establishing wireless connection between the wireless communication module and second equipment; the second equipment corresponds to the second access point;
the wireless communication module 501 is configured to acquire channel information of a second access point, and update the first channel set based on the channel information of the second access point.
According to the electronic device provided by the embodiment of the application, under the condition that a channel scanning strategy of the electronic device, such as a channel scanning time interval, does not need to be modified, the channel scanning range of the wireless communication module is narrowed, so that the channel scanning time of the wireless communication module can be effectively shortened, and the channel scanning power consumption of the wireless communication module can be reduced.
The foregoing description of the various embodiments is intended to highlight various differences between the embodiments, and the same or similar parts may be referred to each other, and for brevity, will not be described again herein.
The methods disclosed in the method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.
The features disclosed in the various product embodiments provided in the present application may be combined arbitrarily without conflict, to arrive at new product embodiments.
The features disclosed in the various method or apparatus embodiments provided herein may be combined in any combination to arrive at new method or apparatus embodiments without conflict.
The computer-readable storage medium may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM), and the like; and may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., including one or any combination of the above-mentioned memories.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one of 8230, and" comprising 8230does not exclude the presence of additional like elements in a process, method, article, or apparatus comprising the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus necessary general hardware nodes, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in the embodiments of the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A method of channel scanning, the method comprising:
scanning a first set of channels in response to a first instruction; wherein the first channel set comprises a part of all channels supported by a wireless communication module of the electronic equipment;
if the first access point is detected, stopping scanning the first channel set; the first access point is used for the wireless communication module to establish wireless connection with first equipment; the first device corresponds to the first access point.
2. The method of claim 1, wherein the method further comprises:
scanning a second set of channels in response to a second instruction; wherein the second set of channels includes the all channels.
3. The method of claim 2, wherein an execution time to scan the first set of channels is less than an execution time to scan the second set of channels.
4. A method according to claim 2 or 3, wherein the first time interval is less than the second time interval; the first time interval comprises an interval time between two adjacent scans of the first set of channels; the second time interval comprises an interval time between two adjacent scans of the second set of channels.
5. The method of claim 1, wherein a channel in the first set of channels corresponds to a third access point; the third access point comprises a historical access point of the electronic device; the third access point comprises the first access point.
6. The method of claim 5, wherein the first set of channels is associated with an identity of a set of identities.
7. The method of claim 1, wherein the method further comprises:
obtaining first information; the first information comprises screen brightness information of the electronic equipment and/or position information of the electronic equipment;
if the first information meets a first condition, generating the first instruction; wherein the first condition comprises a change in the first information.
8. The method of claim 2, wherein the method further comprises:
obtaining second information; wherein the second information at least comprises the number of channels in the first channel set and/or detection result information of the first access point;
if the second information meets a second condition, generating the second instruction; wherein the second condition comprises that the number of channels in the first channel set is 0 and/or the detection result information indicates that the first access point is not detected.
9. The method of claim 2, wherein the method further comprises:
if a second access point is detected, stopping scanning the second channel set; the second access point is used for the wireless communication module to establish wireless connection with second equipment; the second device corresponds to the second access point;
and acquiring the channel information of the second access point, and updating the first channel set based on the channel information of the second access point.
10. An electronic device, comprising:
a wireless communication module to scan a first set of channels in response to a first instruction; wherein the first set of channels includes a portion of all channels supported by a wireless communication module of the electronic device;
the wireless communication module is further configured to stop scanning the first channel set if the first access point is detected; the first access point is used for the wireless communication module to establish wireless connection with first equipment; the first device corresponds to the first access point.
CN202210877495.0A 2022-07-25 2022-07-25 Channel scanning method and electronic equipment Pending CN115243344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210877495.0A CN115243344A (en) 2022-07-25 2022-07-25 Channel scanning method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210877495.0A CN115243344A (en) 2022-07-25 2022-07-25 Channel scanning method and electronic equipment

Publications (1)

Publication Number Publication Date
CN115243344A true CN115243344A (en) 2022-10-25

Family

ID=83676045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210877495.0A Pending CN115243344A (en) 2022-07-25 2022-07-25 Channel scanning method and electronic equipment

Country Status (1)

Country Link
CN (1) CN115243344A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08265823A (en) * 1995-01-27 1996-10-11 Matsushita Electric Ind Co Ltd Radio equipment
US20060142004A1 (en) * 2004-12-23 2006-06-29 Haixiang He Method and apparatus to intelligently perform scanning and assist scanning by profiling scanning history
US20090270091A1 (en) * 2008-04-25 2009-10-29 Microsoft Corporation Selective channel scanning for networked devices
CN104955131A (en) * 2006-10-24 2015-09-30 捷讯研究有限公司 Wlan scanning by prevalence of access point deployment on certain channels
CN108419283A (en) * 2018-01-22 2018-08-17 宇龙计算机通信科技(深圳)有限公司 A kind of method and mobile terminal of WIFI hot spot scanning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08265823A (en) * 1995-01-27 1996-10-11 Matsushita Electric Ind Co Ltd Radio equipment
US20060142004A1 (en) * 2004-12-23 2006-06-29 Haixiang He Method and apparatus to intelligently perform scanning and assist scanning by profiling scanning history
CN104955131A (en) * 2006-10-24 2015-09-30 捷讯研究有限公司 Wlan scanning by prevalence of access point deployment on certain channels
US20090270091A1 (en) * 2008-04-25 2009-10-29 Microsoft Corporation Selective channel scanning for networked devices
CN108419283A (en) * 2018-01-22 2018-08-17 宇龙计算机通信科技(深圳)有限公司 A kind of method and mobile terminal of WIFI hot spot scanning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙卫;黄金科;: "基于QoS的分布式认知无线电网络多信道MAC协议", 计算机科学, no. 1 *

Similar Documents

Publication Publication Date Title
JP4990341B2 (en) Network selection method and apparatus for prioritizing domestic networks in border areas
CN106851654B (en) Pseudo base station identification method, pseudo base station identification device and terminal
US9072035B2 (en) Method and system for task mapping based on corresponding virtual modem identifiers in an operating system for virtual modems within a multi-SIM multi-standby communication device
US8126476B2 (en) System and method for mapping wireless access points
US10021591B2 (en) Limiting access to service providers based on the network traffic load of a wireless access point
CN101502160B (en) Intelligent network acquisition for wireless clients
CN105100213B (en) Apparatus bound method and device
CN112074011B (en) Network registration method, device, computer equipment and storage medium
CN112911556A (en) Method for establishing classic Bluetooth connection between dual-mode Bluetooth devices and dual-mode Bluetooth device
KR100735664B1 (en) Apparatus and method for providing service status using access class barred list in mobile communication system
KR100784331B1 (en) Apparatus and method for menu management under roaming in portable terminal
CN111918308A (en) Non-public network measuring method, device, equipment and storage medium
US20230171586A1 (en) Automated Subscription Management for Wireless Devices Having Multiple Subscription Profiles
EP3869112B1 (en) Air-conditioning device control method and air-conditioning device
CN105830503A (en) Connection method for smart home device and apparatus thereof
CN104185253A (en) Method for accessing wireless router, related device and system thereof
CN112152853A (en) Equipment network distribution method and device, computer-readable storage medium and electronic device
JPWO2014208612A1 (en) Control device, control method, communication system, and program
CN104427583A (en) Higher priority network scanning
KR102191366B1 (en) Handover method and apparatus of electronic deivce in a wireless communication system
CN112671572B (en) Method and device for intelligent equipment network distribution, storage medium and electronic device
WO2014187601A1 (en) Device to device communication
CN110536353B (en) Flow control method and device
CN115243344A (en) Channel scanning method and electronic equipment
CN111050380A (en) Hotspot opening method and device, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination