A channel scanning method and electronic device

By dynamically adjusting the dwell time during channel scanning, the problem of STA devices missing target APs due to time constraints is solved, improving the network connectivity experience and saving scanning time and power consumption.

CN122317801APending Publication Date: 2026-06-30LENOVO (BEIJING) LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LENOVO (BEIJING) LTD
Filing Date
2026-02-28
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing technologies, STA devices may miss target APs during channel scanning due to time constraints, affecting network connectivity.

Method used

By configuring the initial dwell time based on the first reference data and dynamically adjusting it to the target dwell time in combination with the second reference data, the channel scanning strategy is optimized to ensure that the dwell time on each channel is reasonably allocated.

Benefits of technology

It increases the probability of detecting target APs, improves the user's network connection experience, saves scanning time, and reduces power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122317801A_ABST
    Figure CN122317801A_ABST
Patent Text Reader

Abstract

This disclosure provides a channel scanning method and an electronic device, relating to the field of wireless communication technology. The channel scanning method includes: in response to satisfying a channel scanning trigger condition, configuring an initial dwell time for a wireless communication module of an electronic device on each scanning channel based on first reference data; the first reference data at least characterizes the usage data of the electronic device; acquiring second reference data, and dynamically adjusting the initial dwell time of a target scanning channel to a corresponding target dwell time based on the second reference data; the second reference data at least characterizes the load status of the scanning channel of the wireless communication module, the target scanning channel being at least one of the scanning channels; and controlling the wireless communication module to perform a scanning operation on the target scanning channel with the corresponding target dwell time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of wireless communication technology, and in particular to a channel scanning method and an electronic device. Background Technology

[0002] In the field of modern wireless communication, wireless terminal devices (STAs, Stations) discover and connect to wireless access points (APs) by scanning different channels. During the scanning process, the wireless network module (such as a WIFI module) of the STA device must reside on each channel for a period of time in order to capture probe response frames or beacon frames replied by the AP, thereby discovering the target AP based on these frames.

[0003] Current mainstream operating systems (such as Windows) often impose strict limits on scanning time, such as stipulating that the return time of the scan list cannot exceed 4 seconds. Traditional techniques distribute the upper limit of the scanning time evenly across the entire set of channels supported by all countries worldwide, obtaining the dwell time for each channel, and then scanning each channel based on this dwell time. However, this scanning method may result in the target AP being missed, and the STA device has a low probability of discovering the target AP, affecting the user's network connection experience. Summary of the Invention

[0004] This disclosure provides a channel scanning method and an electronic device.

[0005] According to a first aspect of this disclosure, a channel scanning method is provided, comprising: in response to satisfying a channel scanning trigger condition, configuring an initial dwell time of a wireless communication module of an electronic device in each scanning channel based on first reference data; the first reference data at least characterizing usage data of the electronic device; acquiring second reference data, and dynamically adjusting the initial dwell time of a target scanning channel to a corresponding target dwell time based on the second reference data; the second reference data at least characterizing the load status of the scanning channel of the wireless communication module, the target scanning channel being at least one of the scanning channels; and controlling the wireless communication module to perform a scanning operation on the target scanning channel with a corresponding target dwell time.

[0006] According to a second aspect of this disclosure, an electronic device is provided, comprising:

[0007] The device body and a wireless communication module disposed on the device body, the wireless communication module being configured with corresponding driver and firmware programs, the driver and firmware programs being configured to perform the following operations: In response to the fulfillment of the channel scanning trigger condition, the initial dwell time of the wireless communication module of the electronic device in each scanning channel is configured based on the first reference data; the first reference data at least characterizes the usage data of the electronic device; A second reference data is obtained, and the initial dwell time of the target scanning channel is dynamically adjusted to the corresponding target dwell time based on the second reference data; the second reference data at least characterizes the load status of the scanning channel of the wireless communication module, and the target scanning channel is at least one of the scanning channels; The wireless communication module is controlled to perform a scanning operation on the target scanning channel for a corresponding target dwell time.

[0008] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0009] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which: In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts.

[0010] Figure 1 A flowchart illustrating a channel scanning method according to an embodiment of this disclosure is shown. Figure 1 ; Figure 2 A flowchart illustrating a channel scanning method according to an embodiment of this disclosure is shown. Figure 2 ; Figure 3 A schematic diagram of the composition structure of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0011] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0012] Figure 1 A flowchart illustrating a channel scanning method according to an embodiment of this disclosure is shown. Figure 1 ,like Figure 1 As shown, a channel scanning method includes: Step S101: In response to the satisfaction of the channel scanning trigger condition, configure the initial dwell time of the wireless communication module of the electronic device in each scanning channel based on the first reference data.

[0013] In this disclosure, channel scanning trigger conditions refer to various events or state conditions that trigger the electronic device to control the wireless communication module to perform channel scanning operations. Channel scanning conditions include, but are not limited to: the interval of periodic scanning being reached, such as a channel scan being performed once every 30 seconds, triggered when the 30-second interval is reached; user-initiated scanning operations, such as a user clicking the "Search Networks" button in the wireless network settings interface to actively initiate a channel scan; the quality of the currently connected network not meeting usage requirements, such as when the packet loss rate, signal strength, transmission rate, etc., of the currently connected network are lower than the corresponding preset thresholds, triggering a channel scan to find a better network; the physical location of the electronic device being moved, such as when the location sensor of the electronic device (such as GPS, base station positioning, or WiFi fingerprint positioning, etc.) detects a significant change in the device's location (e.g., moving from location A to location B, with the moving distance exceeding a preset threshold, such as 100 meters), triggering a scan; the electronic device starting up and running applications with specific network requirements, such as starting large-scale online games, 4K video projection, cloud office, etc., applications with high requirements for network bandwidth and stability; and the state triggering of the electronic device, such as when the electronic device completes power-on, turns on the wireless network switch, or moves from an area with no network signal to an area with network signal coverage, triggering a scan.

[0014] In this disclosure, the first reference data is a basic dataset used to determine the initial scanning strategy. It at least characterizes the usage data of the electronic device, i.e., various types of information related to the current or historical usage status of the electronic device. The usage data may include usage environment data of the electronic device, such as the usage region, country / region, electromagnetic interference in the current environment, etc.; network usage data (commonly used wireless communication frequency bands, channels of historically connected APs, preset channel priorities of the electronic device, etc.); and historical usage preference data (such as users' long-term preference for connecting to the 5GHz band rather than the 2.4GHz band, preference for connecting to APs on specific channels, etc.).

[0015] In this disclosure, the wireless communication module is a hardware module with wireless communication capabilities integrated into an electronic device, such as a WiFi module, responsible for performing specific channel scanning and AP signal capture operations. Each scanning channel is a channel that needs to be scanned in the current scenario. It can be a channel that complies with the communication standards of the current location and is allowed to be used. It can include all legal channels in the 2.4GHz, 5GHz, and 6GHz frequency bands, or it can include a portion of the channels selected based on the usage data of the electronic device (such as selecting only legal channels in the 5GHz band based on user preferences).

[0016] In this disclosure, the initial dwell time is the initial dwell time of the wireless communication module when performing scanning operations on each scanning channel. The initial dwell time is calculated based on the first reference data and can be allocated to the total scanning time set by the system in combination with the number of channels to be scanned, thereby obtaining the initial dwell time of each scanning channel. The initial dwell time of each scanning channel can be the same or different. If the total scanning time is evenly allocated based solely on the number of channels, the initial dwell time of each channel will be consistent. For example, if the total scanning time is 840ms and 14 channels need to be scanned, the initial dwell time of each channel will be 60ms. If a non-uniform allocation is performed by combining multiple dimensions of data such as the number of channels, the frequency band, the channel priority configured by the wireless communication module, and the historical usage preferences of electronic devices, the initial dwell time of each channel will differ. For example, a 70ms dwell time may be allocated to high-priority channels in the 5GHz band, while a 50ms dwell time may be allocated to ordinary channels in the 2.4GHz band.

[0017] Step S102: Obtain second reference data, and dynamically adjust the initial dwell time of the target scanning channel to the corresponding target dwell time based on the second reference data.

[0018] In this disclosure, the second reference data is used to characterize the actual load status of each scanning channel corresponding to the wireless communication module. The load status characterizes the busy level of each scanning channel, such as whether there is data exceeding the channel's carrying capacity, electromagnetic interference, signal conflicts, etc. The target scanning channel is the scanning channel whose initial dwell time needs to be dynamically adjusted, and the target scanning channel is at least one of the scanning channels. In one example, the dwell time of all scanning channels can be adjusted to achieve fine-grained optimization of all channels; alternatively, only scanning channels whose load exceeds a preset threshold can be adjusted, such as only congested channels with channel utilization exceeding 50% can be adjusted; alternatively, based on the usage frequency and usage requirements of the electronic device, some unsuitable channels can be excluded, and the remaining channels can be adjusted, such as excluding channels not supported by the wireless communication module or low-frequency channels that the user has never connected to, and then adjusting the remaining channels.

[0019] In this disclosure, the initial dwell time of the target scanning channel is dynamically adjusted to the corresponding target dwell time based on the second reference data. That is, the initial dwell time of each channel is adaptively adjusted based on the load of each channel. For example, the dwell time of a congested channel is appropriately extended, and the dwell time of an idle channel is appropriately shortened. Different target scanning channels have different adjustment ranges according to their own load conditions, and finally, their respective target dwell times are obtained. That is, the dwell time of the wireless communication module when performing scanning operations on each target scanning channel is a unique duration of the scanning channel that fits its own load conditions.

[0020] Step S103: Control the wireless communication module to perform a scanning operation on the target scanning channel with the corresponding target dwell time.

[0021] In this disclosure, the target dwell time corresponding to the target scanning channel can be sent to the wireless communication module, and the wireless communication module can be controlled to perform scanning operations on the target scanning channel according to the corresponding target dwell time. That is, the wireless communication module dwells on each target scanning channel for its corresponding target dwell time, and completes the scanning of the channel during the dwell time, including listening to and capturing the beacon frames periodically broadcast by the AP on the channel, receiving and decoding the probe response frames replied by the AP to the probe request frames on the channel, thereby discovering the target AP based on these frames, and also obtaining key information such as the AP's service set identifier (SSID), signal strength, encryption method, and working channel based on these frames.

[0022] In this disclosure, the initial dwell time of the scanning channel is first configured based on the usage data of the electronic device, ensuring that the initial dwell time is consistent with the actual usage scenario of the device and the channel specifications of the current region, thus avoiding wasting scanning time on disabled channels. Then, the initial dwell time is dynamically adjusted based on the actual load of the channel to obtain the target dwell time for each channel. This achieves adaptive matching of the target dwell time to the channel state, solving the problem of AP missed detection due to insufficient dwell time on congested channels. At the same time, the dwell time is shortened on idle channels, saving scanning time and allowing time to be allocated to congested channels.

[0023] In another embodiment, step S101, "configuring the initial dwell time of the wireless communication module of the electronic device in each scanning channel based on the first reference data," includes: Based on the usage environment data or network data of the electronic device, determine the number of channels and / or channel identifiers allowed in the current location; allocate target duration based on the number of channels and / or channel identifiers to obtain the initial dwell time of the wireless communication module in each scanning channel; each scanning channel is all or some of the channels allowed in the current location of the electronic device.

[0024] In this disclosure, the environmental data used can be multi-dimensional information describing the physical environment in which the electronic device is currently located, including but not limited to the following types: location coordinate data, i.e., latitude and longitude coordinate information obtained through a Global Positioning System (GPS) module, Beidou positioning module, or Assisted GPS (A-GPS) (such as 39.9042°N, 116.4074°E), or indoor coordinate location obtained through WiFi fingerprint positioning or Bluetooth beacon positioning; network address data, i.e., the mobile country code and mobile network code of the cellular network currently connected to the electronic device, or the location information obtained through IP address geolocation query service; geographic environment data, i.e., environmental feature data with clear geographical location attributes, such as specific landmark buildings (such as the Forbidden City in Beijing, the Oriental Pearl Tower in Shanghai), specific scenic spots or famous rivers (such as Huangshan Mountain, the Three Gorges of the Yangtze River) determined by electronic map matching. The network data used is information about the currently connected wireless network. This network data includes the geographical information of the wireless network. For example, during normal operation or scanning, the wireless communication module receives Beacon frames or ProbeResponse frames sent by nearby APs, parses the country information element contained in the frame, and extracts the country code string.

[0025] In this disclosure, the number of channels and / or channel identifiers allowed in the current location can be determined based on the usage environment data or network data of the electronic device. First, the geographical information contained in the usage environment data is parsed, such as querying the corresponding country code using coordinate information determined by the BeiDou positioning module, or directly obtaining the geographical information and country code from the network data. Then, a pre-stored channel regulation database is queried to obtain the number of channels or channel identifiers allowed for that geographical information (such as the country code). For example, the channel regulation database may directly store the number of channels allowed for each country, which can be directly queried based on the country code (e.g., 13 channels are allowed in the 2.4GHz band in China). If the channel regulation database only stores the channel identifiers allowed for each country, then the channel identifiers allowed for that country are queried based on the country code (e.g., the channel identifiers allowed for use in the 5GHz band in China are 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165, etc.).

[0026] In this disclosure, the target set duration refers to the upper limit of the total time for a single scan mandated by the operating system. For example, the Windows operating system stipulates a total scan time limit of 4000 milliseconds (4 seconds). This upper limit ensures that the wireless device does not spend too much time scanning the network, thus affecting other functions (such as data transmission). After obtaining the number of channels and / or channel identifiers allowed in the current location, the individual scanning channels to be scanned can be determined. Each scanning channel can be all channels allowed in the current location, or all channels supported by the wireless communication module hardware (or possibly only a portion of all channels allowed in the current location), excluding channels not supported by the wireless communication module hardware (such as RF front-end filter limitations) or blocked in the driver configuration. After determining the scanning channels to be scanned, the target duration can be evenly allocated to each channel. For example, if 20 channels are allowed to be scanned based on geographical information, the initial dwell time for each channel can be 4000ms ÷ 20 = 200ms. Alternatively, a frequency band-differentiated allocation method can be used to allocate the target duration, that is, different durations are allocated according to the frequency band to which the channel identifier belongs (2.4GHz / 5GHz / 6GHz, etc.), and then further subdivided within each frequency band according to the number of channels in that band. For example, 840ms could be allocated to the 2.4GHz band. The total duration is 1420ms for the 5GHz band and 1740ms for the 6GHz band. If the 2.4GHz band is determined to allow 13 channels based on geographical information, the initial dwell time for each channel is approximately 64.6ms. If the 5GHz band is determined to allow 20 channels based on geographical information, the initial dwell time for each channel is approximately 71ms. Alternatively, a priority-weighted allocation method can be used, which adjusts the equal allocation results by weighting the priority coefficients corresponding to the channel identifiers (e.g., the coefficients for channels 1, 6, and 11 are 1.2, and the coefficients for other channels are 1.0).

[0027] In this disclosure, by combining environmental data (location coordinates, network address, geographical environment) or network data (country information carried by the AP) to determine the geographically permitted channels, the scanning strategy can automatically adapt to the radio regulations of different countries and regions. This avoids the time wasted due to ineffective camping on unsupported channels during global full-channel scanning, thus allowing the saved time to be used for in-depth scanning of supported channels. Simultaneously, by flexibly selecting all or some channels (matching hardware support capabilities), the scanning strategy can be tailored to the actual hardware capabilities of the wireless communication module, optimizing the scanning range while ensuring compliance and avoiding errors or anomalies caused by sending scanning commands to channels not supported by the hardware.

[0028] In another embodiment, step S101, "configuring the initial dwell time of the wireless communication module of the electronic device in each scanning channel based on the first reference data," includes: Based on the historical usage preference data of the electronic device and / or the channel configuration data of the wireless communication module, determine the number of channels and / or channel identifiers of the channels to be scanned in the current location; allocate the target setting time based on the number of channels and / or channel identifiers to obtain the initial dwell time of the wireless communication module in each scanning channel; each scanning channel is all or some of the channels allowed in the current location of the electronic device.

[0029] In this disclosure, historical usage preference data refers to data accumulated by electronic devices over a long period of operation that reflects the connection habits of a specific user or device. Historical usage preference data may include: frequency bands preferred by the user, i.e., preference patterns discovered by statistically analyzing the user's historical connection records. For example, if a user connects to a 5GHz network 90% of the time in the past 30 days, then the user is determined to prefer the 5GHz frequency band; and required frequency bands or channels determined by the user's profession or personal experience, i.e., fixed channel requirements formed based on the user's professional characteristics (such as network engineer, wireless tester) or personal usage experience (such as having lived in a specific country for a long time). For example, a network engineer often tests channels 1, 6, and 11 of the 2.4GHz frequency band for work purposes, and these channels are marked as professionally preferred channels, or a user is familiar with and uses a channel specific to the United States because they have worked in the United States.

[0030] In this disclosure, channel configuration data refers to the operating parameters of the wireless communication module actively set by the user or administrator. For example, the frequency band setting, that is, the WiFi connection frequency band preference manually configured by the user through the system settings interface, such as setting "connect only to the 2.4GHz band", "connect only to the 5GHz band", or "connect only to the 6GHz band". This setting directly limits the scanning range to the channels within the corresponding frequency band. The channel enable or disable configuration determined by the user, that is, in high-density deployment scenarios (such as office buildings, conference centers), in order to avoid co-channel interference or meet specific network planning requirements, the user or network administrator actively restricts the use of certain channels. For example, actively disabling channels 1 and 6 of the 2.4GHz band and using only channel 11, or disabling channels 52-64 in the 5GHz band, etc.

[0031] In this disclosure, after determining the number of channels and / or channel identifiers to be scanned in the current location based on the historical usage preferences of the electronic device and / or the channel configuration data of the wireless communication module, the target dwell time can be allocated based on the number of channels and / or the channel identifiers to obtain the initial dwell time of the wireless communication module on each scanning channel. The allocation method can employ equal allocation, frequency band differentiated allocation, and priority weighted allocation, etc., which have been described above and will not be repeated here. Of course, the allocation method can also employ preference-differential allocation, that is, different initial dwell times are allocated to channels used by different users. For example, the initial dwell time of the channel used most frequently by the user is greater than the initial dwell time of the channel used second most frequently by the user.

[0032] In this disclosure, by learning users' historical connection preferences (frequency band preferences, occupation-related channels), the scanning strategy can prioritize channels that users are actually likely to connect to, avoiding wasting scanning time on channels that are never used or rarely used. For example, in a scenario where users consistently use a home 5GHz network, the strategy avoids prolonged stays on 2.4GHz channels. By combining channel configuration data (user-defined frequency band restrictions, actively disabled interference channels), the scanning strategy can respect users' active choices and adapt to the needs of specific deployment scenarios (such as channel avoidance in high-density office building environments), ensuring that the scanning results match the user's actual connection intentions. This significantly shortens the time to discover target APs, improves the user's perceived scanning response speed, reduces unnecessary radio frequency switching and eavesdropping, lowers power consumption during the scanning process, and allows users to intervene in scanning behavior through simple configuration, enhancing the system's flexibility and user controllability.

[0033] In another embodiment, "acquiring second reference data" in step S102 includes at least one of the following: The relative utilization of each channel is calculated based on the beacon frames and probe response frames received in real time by the wireless communication module, and the relative utilization is used as the second reference data.

[0034] In this disclosure, the beacon frame is a management frame periodically broadcast by the wireless access point (AP) to announce the AP's presence and basic service set parameters. Its frame body contains multiple information elements, among which the QBSS LoadElement is specifically used to carry channel load information. The probe response frame is a unicast management frame sent by the AP in response to a probe request frame sent by a station (STA). Its frame body structure is similar to the beacon frame, also containing a QBSS Load Element. The wireless communication module can capture beacon frames and probe response frames on the channel, and then parse the ChannelUtilization field under the QBSS Load Element 802.11e CCA version in the 802.11 wirelessmanagementframe of these frames. This field, the channel utilization parameter, is the core field of the QBSS Load Element, with a value ranging from 0 to 255, used to quantify the current channel busyness. Its value is proportional to the percentage of time the channel is actually occupied. The Channel Utilization parameter essentially represents the proportion of time the channel was occupied by various 802.11 signals (data frames, management frames, control frames) over a past period (usually the AP's Beacon period, such as 100ms). This proportion is quantized and mapped to an integer between 0 and 255. Finally, this Channel Utilization field value is normalized by dividing by 255 to obtain the relative utilization rate (a floating-point number between 0 and 1, or a percentage value between 0% and 100%). For multiple frames received from multiple APs on the same channel (e.g., multiple APs operating on the same channel), the value of the most recently received frame can be taken as the relative utilization rate of the channel, or the arithmetic mean of the Channel Utilization values ​​of multiple frames can be taken as the relative utilization rate of the channel.

[0035] The channel load rate of each channel is calculated using the real-time data transmission volume and the maximum data transmission volume of each channel, and the channel load rate is used as the second reference data.

[0036] In this disclosure, real-time data transmission volume refers to the total number of bytes or frames of data frames actually transmitted through a channel during the period the wireless communication module is monitoring that channel. Maximum data transmission volume refers to the theoretically maximum amount of data that the channel can transmit within the same observation duration (e.g., 100 milliseconds) under the current physical layer parameter configuration. The channel load rate can be calculated as: Channel load rate = Real-time data transmission volume ÷ Maximum data transmission volume × 100%. For example, if 15MB of data is actually received within 100 milliseconds, and the maximum data transmission volume of the channel is 30MB, then the channel load rate is 50%.

[0037] The channel interference rate of each channel is calculated using the number of interfering frames and the total number of frames for each channel, and the channel interference rate is used as the second reference data.

[0038] In this disclosure, an interfering frame refers to a radio signal detected on the channel that cannot be correctly parsed into a valid frame, or a frame that can be partially parsed but fails the Cyclic Redundancy Check (CRC). These typically originate from electromagnetic interference from other devices (such as Bluetooth devices, microwave ovens, wireless cameras, ZigBee devices, cordless phones, car radar, etc.), signal overlap interference from adjacent channels (such as frequency overlap between channels 1 and 3 in the 2.4 GHz band), or reception errors due to multipath fading or signal attenuation. The total number of frames refers to the total number of all frames detected on the channel, including successfully parsed valid frames and the aforementioned interfering frames. The channel interference rate can be calculated as: Channel interference rate = Number of interfering frames ÷ Total number of frames × 100%. For example, if 80 valid frames and 20 interfering frames are detected on a certain channel, the channel interference rate is 20%. A high interference rate indicates that there is serious interference or signal quality problems on the channel, and even if the channel utilization is low (relatively low utilization), it may lead to the failure to receive AP response frames or an increased bit error rate.

[0039] This disclosure provides three methods for obtaining second parameter data. These three methods can be used individually (selecting the most suitable method according to the scenario) or in combination (such as weighting and combining the three indicators to form a comprehensive load index). This provides a multi-dimensional and multi-scenario load assessment means for dynamically adjusting dwell time, enabling scanning strategies to more comprehensively perceive channel quality (including traffic occupancy, actual throughput load, and external interference level), thereby making more accurate time allocation decisions and improving AP discovery rate in complex electromagnetic environments.

[0040] In another embodiment, step S102, "dynamically adjusting the initial dwell time of the target scanning channel to the corresponding target dwell time based on the second reference data," includes: Determine the difference between the load parameter characterizing the load of the scanning channel of the wireless communication module and the standard setting value; different load parameters correspond to different standard setting values, and the load parameter includes at least one of the following: channel load rate, relative utilization rate, and channel interference rate; adjust the initial dwell time of each scanning channel to the corresponding target dwell time based on the difference; wherein, the larger the difference, the greater the adjustment range of the corresponding dwell time.

[0041] In this disclosure, load parameters refer to numerical indicators extracted from the second reference data used to quantify channel load conditions. These parameters can take the form of single-dimensional parameters or multi-dimensional composite parameters. Single-dimensional parameters are any one of the aforementioned relative utilization, channel load rate, and channel interference rate, such as directly using relative utilization (0%-100%) as the load parameter. Multi-dimensional composite parameters are comprehensive indicators obtained by weighted calculation and fusion of multiple single-dimensional parameters, or comprehensive indicators obtained using more complex fusion algorithms such as fuzzy comprehensive evaluation or principal component analysis. Standard setting values ​​refer to preset benchmark thresholds used to determine whether the channel load is in a normal or standard state. Different load parameters correspond to different standard setting values: for relative utilization, the standard setting value is usually set in the range of 40%-60%, such as 50%; for channel load rate, the standard setting value can be set higher (such as 60%-70%), because this parameter reflects the actual throughput rather than the time usage; for channel interference rate, the standard setting value is usually set lower (such as 10%-20%), because interference often has a more serious impact on communication quality than the same level of traffic, and even a small amount of interference may cause frame reception failure; for multi-dimensional comprehensive parameters, the standard setting value can be determined by comprehensive calculation based on the weight of each dimension and the standard setting value of each dimension.

[0042] In this disclosure, the difference is the absolute difference between the actual value of the load parameter and the standard setting value. This difference is a quantified value that intuitively represents the degree of deviation between the actual channel load and the baseline state. The larger the difference, the more the channel load deviates from the baseline state (either more congested or more idle), requiring a greater adjustment to the dwell time. In one example, if the actual relative utilization of channel 36 is 0.7 and its standard setting value is 0.5, then the difference = |0.7 - 0.5| = 0.2; the actual channel interference rate of channel 40 is 0.3 and its standard setting value is 0.5, then the difference = |0.3 - 0.5| = 0.2. The difference is the same for both, indicating that the degree of deviation of the load from the baseline state is the same, requiring the same adjustment.

[0043] In this disclosure, by introducing a standard setpoint as a benchmark, the absolute load value is transformed into a relative difference, making the adjustment strategy environmentally adaptable. Different standard values ​​can be set for different environments or application scenarios to adapt to local network characteristics. By establishing a positive correlation between the difference and the adjustment range, on-demand time resource scheduling is achieved, ensuring that the channel with the greater deviation from the standard setpoint corresponds to the greater adjustment range, thus guaranteeing the fine-grained and differentiated allocation of scanning time.

[0044] In another embodiment, adjusting the initial dwell time of each scanning channel to the corresponding target dwell time based on the difference includes: In response to the load parameter being greater than the standard setting value, a first adjustment range is determined based on the difference, and the initial dwell time of the scanning channel is increased by the first adjustment range to obtain the target dwell time corresponding to the scanning channel; In response to the load parameter being less than the standard setting value, a second adjustment range is determined based on the difference, and the initial dwell time of the scanning channel is reduced by the second adjustment range to obtain the target dwell time corresponding to the scanning channel.

[0045] In this disclosure, when the load parameter exceeds the standard setting value, it indicates that the channel is currently in a congested state. This state has the following characteristics: the channel is occupied by signals for a high proportion of time, causing the AP to need to perform a backoff process when sending beacon frames or probe response frames, and the actual transmission time of the frame has a random delay; high load may be accompanied by contention among multiple APs or STAs, increasing the probability of frame collisions and retransmissions, further prolonging the time for frames to arrive at the STA; in high interference environments, even if the AP has sent a frame, the frame may be corrupted due to interference and need to be retransmitted. Therefore, if scanning is performed according to the initial dwell time, these delayed valid response frames may be missed due to insufficient time, so it is necessary to increase the initial dwell time.

[0046] In this disclosure, the first adjustment magnitude is related to the difference between the load parameter and the standard setting value; the larger the difference, the larger the first adjustment magnitude. In one example, assuming the standard setting value is 50%, each time the difference between the load parameter and the standard setting value increases by 10%, the dwell time of the channel is increased by 10%. If the initial dwell time of channel 36 is 60ms, the actual value of the load parameter is 80%, and the difference is 80% - 50% = 30%, then the target dwell time = 60ms × (1 + 30%) = 78ms.

[0047] In this disclosure, when the load parameters are less than the standard set value, it indicates that the channel is currently in an idle state. This state has the following characteristics: the channel is occupied for a low proportion of time, and the AP's Beacon frames can be sent on time at fixed intervals without waiting or backoff; there are few competing devices, and Probe Response frames can be sent immediately after SIFS (Short Interframe Spacing), with minimal delay; the interference level is low, the frame transmission success rate is high, and retransmission is unnecessary. Therefore, scanning according to the initial dwell time would waste time, while reducing the initial dwell time is still sufficient to capture all the necessary frame information.

[0048] In this disclosure, the second adjustment magnitude is related to the difference between the load parameter and the standard setting value; the larger the difference, the larger the second adjustment magnitude. In one example, assuming the standard setting value is 50%, each time the difference between the load parameter and the standard setting value increases by 10%, the dwell time of the channel is reduced by 10%. If the initial dwell time of channel 40 is 60ms, the actual value of the load parameter is 30%, and the difference is 50%-30%=20%, then the target dwell time = 60ms×(1-20%)=48ms. It should be emphasized that, under the same difference, the proportion of increasing or decreasing the dwell time of the channel can be different. For example, each time the difference between the load parameter and the standard setting value increases by 10%, if the load parameter is greater than the standard setting value, the dwell time of the channel can be increased by 20% to cope with unpredictable delays; if the load parameter is less than the standard setting value, the dwell time of the channel can be reduced by 10% to ensure basic reception reliability. For the same difference, the percentage increase or decrease in dwell time for a channel can vary depending on the frequency band. For example, whenever the difference between the load parameter and the standard setting increases by 10%, the dwell time can be increased by 20% for the 5 GHz band, and by 10% for the 2.4 GHz and 6 GHz bands.

[0049] In this disclosure, by distinguishing between two cases where the load parameter is greater than the standard set value and the load parameter is less than the standard set value, fine-grained control of extending congested channels and shortening idle channels is achieved, enabling the scanning strategy to adapt to the real-time load polarity of the channel. By defining a first adjustment range and a second adjustment range respectively, differentiated adjustment strategies are allowed for the direction of increase or decrease (such as being more aggressive when increasing to cope with unpredictable delays, and more conservative when decreasing to ensure basic reception reliability), enhancing the flexibility and robustness of the strategy. By determining the adjustment range based on the difference, the rationality and adaptability of the adjustment are ensured, with the adjustment being larger the further it deviates from the standard, thus achieving dynamic rebalancing of the scanning time.

[0050] In another embodiment, step S102, "dynamically adjusting the initial dwell time of the target scanning channel to the corresponding target dwell time based on the second reference data," includes: The target scanning channel is determined based on the load parameters that characterize the load of the scanning channel of the wireless communication module; the number of target scanning channels is less than that of each scanning channel; the initial dwell time of each target scanning channel is adjusted to the corresponding target dwell time based on the number of target scanning channels and the difference between the load parameters and the standard setting value.

[0051] In this disclosure, the target scanning channel is determined by the electronic device based on a comparison between load parameters and a preset threshold. In one example, the target scanning channel selection strategy may include: a high-load selection strategy, which sets a high load threshold (e.g., relative utilization > 60% or channel load rate > 70%), and only identifies channels with load parameters exceeding this threshold as target scanning channels. These channels are typically congested and require extended dwell time to capture delayed responses; and a rate-of-change selection strategy, which calculates the rate of change of each channel's load parameters relative to the previous scan, and identifies the top N channels with the largest absolute values ​​of the rate of change as target scanning channels to quickly respond to environmental changes. For example, assuming there are 20 scanning channels in total, after high-load selection, five channels (channels 6, 36, 40, 149, and 153) with relative utilization > 60% are identified, and these five channels are identified as target scanning channels. The number of target scanning channels is significantly less than the total number of initially configured scanning channels, meaning at least one channel is excluded from dynamic adjustment. The excluded channels are usually those with load parameters in the medium range (close to the standard setting), because the initial dwell time of these channels is already reasonable, and the expected benefits of dynamic adjustment are limited.

[0052] In this disclosure, the initial dwell time of each target scanning channel is first recalculated based on the number of target scanning channels. Assuming the initial total dwell time of all scanning channels is 4000ms, the 4000ms is evenly distributed to each target scanning channel (e.g., for 20 channels, the initial dwell time of each target scanning channel is 200ms). Then, the adjustment range of each channel is calculated based on the difference between the load parameters of each target scanning channel and the standard setting value. Finally, the initial dwell time of each target scanning channel is adjusted based on the adjustment range of each target scanning channel.

[0053] In this disclosure, by selecting channels with excessive load from all scanned channels as the targets for dynamic adjustment, the system overhead caused by indiscriminate calculations on all channels is avoided, significantly reducing the computational complexity of dynamic adjustment and the communication burden between the driver and firmware. This scheme, while ensuring scan coverage (all channels are scanned, only the duration of some channels is adjusted), concentrates optimization resources on high-yield channels, significantly improving the scanning effect of critical channels.

[0054] In another embodiment, step S103, "controlling the wireless communication module to perform a scanning operation on the target scanning channel with a corresponding target dwell time," includes: In response to a channel scanning request from the operating system, the scanning parameters of the target scanning channel are obtained based on the target scanning driver, and the scanning parameters are given to the scanning firmware of the wireless communication module. The scanning parameters include at least the target dwell time of the target scanning channel. The wireless communication module is controlled to sequentially dwell on each target scanning channel for the corresponding target dwell time in order to obtain the corresponding beacon frame and / or probe response frame.

[0055] In this embodiment, the channel scan request of the operating system refers to a network discovery request initiated by the operating system or a specific application under the operating system. The target scan driver refers to a software component installed in the electronic device specifically designed to control the wireless communication module to perform scanning operations, typically a WiFi module driver. Scanning parameters refer to the specific set of configuration data used to guide the scanning operation, including target dwell time and other parameters (such as channel switching rules, scanning priority, etc.). Channel switching rules include the switching delay time between channels (such as the RF synthesizer settling time), the switching order (ascending / descending order by channel number or sorted by priority), and whether certain channels are allowed to be skipped under specific conditions; scanning priority includes the scanning urgency level marking of each channel (such as scanning high-priority channels first), and the scanning order strategy between multiple frequency bands (2.4GHz / 5GHz / 6GHz) (such as scanning 5GHz first and then 2.4GHz). The target scan driver needs to provide the scanning parameters to the scanning firmware of the wireless communication module (such as the WiFi chip firmware).

[0056] In this disclosure, the scanning firmware can be a low-level control program burned into the non-volatile memory (such as Flash) inside the wireless communication module, responsible for directly controlling the RF circuit, baseband processor (BB), media access control (MAC), and other hardware to perform scanning operations. The transmission process is completed through the physical communication interface between the host and the wireless communication module. The interface types include PCIe (for built-in WiFi modules), USB (for external WiFi adapters), and SDIO (for embedded WiFi modules). The communication protocol follows the proprietary command format or industry standard format defined by the module manufacturer (such as WMI-TLV commands, SDIOCMD53 / 54, USB control transmission, etc.).

[0057] In this disclosure, the scanning firmware parses the received scanning parameters, extracts the channel number (e.g., 36) and corresponding target dwell time (e.g., 150ms) of the first target scanning channel, as well as auxiliary parameters such as channel switching rules and scanning priority; then, it configures the RF synthesizer (PLL) to switch to the center frequency of the channel (e.g., 5180MHz) and waits for the RF circuit to stabilize (waiting 200μs according to the switching rule parameters); next, it starts the baseband receiver circuit, enters the listening state, and simultaneously starts a hardware timer (e.g., a microsecond counter), setting the timer value to the target dwell time; during the timer period, the firmware performs specific scanning operations: if it is a passive scan, it only listens to the Beacon frames on the channel; if it is an active scan, it immediately sends a Probe Request frame at the start of dwell time and listens for Probe. Response frames and Beacon frames are received; the received frames are parsed and cached in the firmware's scan result buffer; when the hardware timer reaches the target dwell time, a timeout interrupt is generated, the firmware saves the capture results of the current channel, determines the next target scan channel according to the scan priority and switching order, and repeats the above process until the scan operation of the target scan channel is completed, or the total scan time reaches the target set time (e.g., 4 seconds). By acquiring Probe Response frames and Beacon frames, the electronic device can discover available APs in the vicinity and obtain their operating parameters, providing data support for subsequent network connection decisions (such as selecting the AP with the strongest signal or the lowest load).

[0058] Figure 2 A flowchart illustrating a channel scanning method according to an embodiment of this disclosure is shown. Figure 2 ,like Figure 2 As shown, the layered architecture design includes an operating system (OS), a target scanning driver (Driver), and scanning firmware (FW). In step S201, the OS triggers a channel scanning request. The target scanning driver obtains the scanning parameters of the target scanning channel and passes these parameters to the scanning firmware of the wireless communication module (step S202, Driver sets scan offload parameters of supported channels to FW). Then, the scanning firmware, using the scanning parameters, sequentially resides on the target scanning channel for the corresponding target dwell time (step S203, FW scan) to obtain beacon frames and / or probe response frames transmitted through the target scanning channel. The scanning results of different target scanning channels can be stored separately. Figure 2 The ch storage area in the middle.

[0059] In this disclosure, a layered architecture design (operating system, driver, firmware) decouples the high-level scanning intent from the low-level hardware execution, enabling dynamic adjustment strategies to be flexibly implemented at the driver layer (e.g., calculating target dwell time based on real-time load) while ensuring precise hardware control (by issuing specific parameters via firmware commands). By issuing the target dwell time as a core scanning parameter, the dynamic adjustment results are ensured to be accurately transmitted to the execution layer, allowing the hardware to actually execute differentiated dwell times. Through sequential dwell and frame capture mechanisms, effective detection of each target scanning channel is achieved, avoiding the complexity and interference problems of parallel scanning. By supporting extended parameters such as channel switching rules and scanning priorities, the scanning process becomes more flexible and controllable.

[0060] In another embodiment, a channel scanning method further includes at least one of the following: In response to the presence of an unscanned target scanning channel after a target set time, the scanning information of the unscanned target scanning channel is provided to the scanning firmware of the wireless communication module to control the wireless communication module to rescan the unscanned target scanning channel; The channel scanning results obtained from the scanning operation are sent to the operating system of the electronic device for display in the target window area of ​​the operating system. The channel scanning results are obtained based on the beacon frame and / or the probe response frame.

[0061] In this embodiment, an unscanned target scanning channel refers to a target scanning channel that has not yet undergone scanning operation after the first round of scanning is completed. The reasons for this include: in the filtering mechanism, some channels are scheduled for subsequent rounds of scanning due to their lower priority; in the dynamic adjustment mechanism, the target dwell time of some channels is significantly extended, causing the total time to exceed the budget, and the remaining channels are postponed; or during the scanning process, scanning of some channels is actively paused due to hardware interruptions, resource contention, or other reasons. The target set duration refers to the upper limit of the total time for a single scan forcibly stipulated by the operating system, such as the 4000 milliseconds (4 seconds) scan time limit stipulated by the Windows operating system. After a round of scanning is completed, the completed channel list returned by the scanning firmware is checked first, compared with the target scanning channel list, to identify whether there are any unscanned target scanning channels; secondly, the current cumulative total scan time is read from the target scanning driver or firmware; when both conditions are met simultaneously, that is, when there are unscanned target scanning channels after the target set duration, the continued scanning process is triggered. This design allows for additional rounds of scanning to complete the scan if the initial scan fails to cover all target channels due to uneven time allocation caused by dynamic adjustments or unexpected timeouts, ensuring scan integrity and avoiding missing potentially available APs.

[0062] In this disclosure, the target scanning driver first identifies unscanned target scanning channels, then reorganizes the scanning parameters, including only information about the unscanned target scanning channels (channel number, target dwell time, etc.), excluding parameters for channels already scanned. These scanning parameters are then sent to the scanning firmware via the same firmware communication interface. The scanning firmware parses the resume scan command, extracts the scanning parameters (channel number, target dwell time, etc.) for the unscanned target scanning channels, sequentially switches to each unscanned target scanning channel, dwells for the corresponding target dwell time, and captures Beacon and ProbeResponse frames. Since these channels may contain important but previously delayed scanning targets (such as channels requiring long dwell times due to high load, or user-preferred channels), the resume scan mechanism ensures their scanning opportunities. It is important to emphasize that the resume scan process may face stricter time constraints (such as the maximum resume scan time allowed by the operating system), and the scanning firmware needs to monitor the cumulative duration in real time, further truncating the dwell time or terminating the scan early if necessary.

[0063] like Figure 2 As shown, after the scanning firmware completes one round of scanning, the target scanning driver will determine whether there are any unscanned remaining channels (Fully scan). If a Fully scan has been completed (all target scanning channels have been scanned), a prompt indicating that all scans have been completed will be sent to the operating system (step S206, Complete OID_WDI_TASK_SCAN). If there is no Fully scan and the total scan duration is greater than the target set duration, the target scanning driver will send the scan parameters of the remaining channels to the scanning firmware based on the target scanning driver (step S207, Driver set scan offload parameters of remaining channels to FW). Afterwards, the scanning firmware will use the scan parameters of the remaining channels to sequentially reside on the remaining channels for the corresponding target residence duration to obtain the corresponding beacon frames and / or probe response frames (step S208, FWscan).

[0064] In this disclosure, by monitoring the scanning progress and duration, the remaining channels are automatically triggered for supplementary scanning after the first scan times out, avoiding the problem of missing some channels due to uneven time allocation caused by dynamic adjustments (such as some channels being excessively extended, resulting in other channels not having time to scan); through the multi-round scanning mechanism, the scanning time is globally optimized and redistributed among the channels, ensuring that the detection of all target channels can still be completed through multiple rounds of scanning even in complex environments (such as when a large number of high-load channels need to extend their stay).

[0065] In this disclosure, the channel scanning result refers to the set of surrounding available access points (APs) information captured and parsed by the wireless communication module after completing a stationary scan on each target scanning channel. This result is generated and organized by the scanning firmware and specifically includes: basic information for each discovered AP, such as SSID (Service Set Identifier, network name, length 0-32 bytes), BSSID (Basic Service Set Identifier, AP's MAC address, 48 ​​bits), and operating channel number (e.g., 1-13 in the 2.4GHz band or 36-165 in the 5GHz band); signal quality information, such as RSSI (Received Signal Strength Indicator, unit: dBm, typical range -30dBm to -90dBm) and SNR (Signal-to-Noise). The signal-to-noise ratio (SNR) is used to generate data. Capability information includes supported 802.11 protocol versions (802.11b / g / n / ac / ax), maximum supported channel bandwidth (20MHz / 40MHz / 80MHz / 160MHz), and supported encryption methods (Open Systems / WEP / WPA / WPA2 / WPA3, Enterprise Edition / Personal Edition). Optional payload information includes Channel Utilization (0-255) extracted from the QBSSLoad Element of the Beacon or Probe Response frame, and the number of associated STAs. The transmission process is triggered by the scanning firmware via an interrupt or asynchronous message mechanism: the scanning firmware organizes the scan result data into a specific format and uploads it to the target scan driver; the target scan driver performs necessary format conversions (such as converting firmware-specific formats to operating system standard formats), filtering (such as removing duplicate BSSIDs and weak signal APs with RSSI below a threshold), and / or sorting (such as sorting by RSSI in descending order), and then reports it to the operation system through the interface defined by the operating system.

[0066] In this disclosure, after receiving the channel scan results, the operating system can display the results in a target window area. In one example, the operating system can first parse the channel scan results, generate an Available Networks List, and remove invalid or hidden entries (such as hidden networks with empty SSID strings). The channel scan results are then presented to the user interface, such as a taskbar network icon dropdown list on Windows (displaying SSID, signal strength bar graph, and security type icons such as open or closed lock), the "WLAN" page in settings applications, or a status bar WiFi icon dropdown list or the "Settings - WLAN" page on Android platforms. The displayed information typically includes the network name (SSID), a visual indication of signal strength, a security type identifier (open network, WPA2, WPA3, etc.), and an optional frequency band indicator (2.4GHz / 5GHz / 6GHz icons). This display allows users to intuitively see available WiFi networks in the vicinity, understand the signal quality and security status of each network, and choose to connect.

[0067] like Figure 2 As shown, the scanning firmware sends the channel scan results to the target scan driver. The target scan driver determines if there are new channel scan results and sends the new channel scan results to the operating system (if there is a new scan list, indicate to the OS in step S204). The Driver scanwatchdog in step S204 is the driver scan monitor, used to monitor the scanning operation within the target set time (e.g., 4 seconds), and also to determine whether the scan is progressing normally and whether the expected goal (e.g., capturing the target frame) has been achieved. After the target scan driver sends the channel scan results to the operating system, the operating system displays the channel scan results (step S205, OS shows scanlist of APs).

[0068] In this embodiment, by converting the raw frame data (Beacon, ProbeResponse) captured by the scanning firmware into structured channel scanning results and reporting them to the operating system, a closed loop of the scanning function is achieved, enabling the radio frequency detection capability of the underlying hardware to be transformed into network information that the operating system can understand and use. By interfacing with the display interface of the operating system, users can obtain surrounding network information in a timely manner through an intuitive user interface, improving the user experience and ease of use of the device.

[0069] The dynamic dwell time of each channel in the different frequency bands (such as 2GHz, 5GHz, and 6GHz) can be calculated independently, as shown in Tables 1-3 below: Table 1

[0070] Table 2

[0071] Table 3

[0072] As shown in Table 3, due to the large number and complexity of 6G channels, adjusting the initial dwell time of 6G channels, such as increasing it by 10%, could easily exceed the target duration (e.g., 4 seconds). Therefore, Table 3 does not reflect any adjustments to the initial dwell time of 6G channels. However, the initial dwell time of 6G channels can be adjusted according to the actual situation, in a manner similar to that used for 2G and 5G.

[0073] According to embodiments of this disclosure, this disclosure also provides an electronic device and a readable storage medium. An electronic device includes: a device body and a wireless communication module disposed on the device body. The wireless communication module is configured with corresponding driver and firmware programs, which are configured to perform the following operations: In response to the fulfillment of the channel scanning trigger condition, the initial dwell time of the wireless communication module of the electronic device in each scanning channel is configured based on the first reference data; the first reference data at least characterizes the usage data of the electronic device; Acquire second reference data, and dynamically adjust the initial dwell time of the target scanning channel to the corresponding target dwell time based on the second reference data; the second reference data at least characterizes the load status of the scanning channel of the wireless communication module, and the target scanning channel is at least one of the various scanning channels; The wireless communication module is controlled to perform a scanning operation on the target scanning channel for the corresponding target dwell time.

[0074] Figure 3 A schematic block diagram (wireless communication module not shown) of an example electronic device 800 that can be used to implement embodiments of the present disclosure is illustrated. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0075] like Figure 3As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0076] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0077] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as a channel scanning method. For example, in some embodiments, a channel scanning method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of a channel scanning method described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform a channel scanning method by any other suitable means (e.g., by means of firmware).

[0078] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0079] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0080] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0081] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0082] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0083] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0084] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.

[0085] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.

[0086] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A channel scanning method, comprising: In response to the satisfaction of the channel scanning triggering condition, the initial dwell time of the wireless communication module of the electronic device in each scanning channel is configured based on the first reference data; The first reference data at least characterizes the usage data of the electronic device; Obtain second reference data, and dynamically adjust the initial dwell time of the target scanning channel to the corresponding target dwell time based on the second reference data; The second reference data at least characterizes the load status of the scanning channel of the wireless communication module, wherein the target scanning channel is at least one of the scanning channels; The wireless communication module is controlled to perform a scanning operation on the target scanning channel for a corresponding target dwell time.

2. The method of claim 1, wherein, The initial dwell time of the wireless communication module of the electronic device configured in each scanning channel based on the first reference data includes: The number of channels and / or channel identifiers allowed in the current location area are determined based on the usage environment data of the electronic device or network data. The target setting time is allocated based on the number of channels and / or channel identifiers to obtain the initial dwell time of the wireless communication module in each scanning channel; each scanning channel is all or some of the channels allowed in the current location of the electronic device.

3. The method according to claim 1 or 2, wherein, The initial dwell time of the wireless communication module of the electronic device configured in each scanning channel based on the first reference data includes: The number of channels and / or channel identifiers to be scanned in the current region are determined based on the historical usage preference data of the electronic device and / or the channel configuration data of the wireless communication module. The target setting time is allocated based on the number of channels and / or channel identifiers to obtain the initial dwell time of the wireless communication module in each scanning channel; each scanning channel is all or some of the channels allowed in the current location of the electronic device.

4. The method according to claim 1, wherein, The acquisition of the second reference data includes at least one of the following: The relative utilization of each channel is calculated based on the beacon frames and probe response frames received in real time by the wireless communication module, and the relative utilization is used as the second reference data. The channel load rate of each channel is calculated using the real-time data transmission volume and the maximum data transmission volume of each channel, and the channel load rate is used as the second reference data. The channel interference rate of each channel is calculated using the number of interfering frames and the total number of frames for each channel, and the channel interference rate is used as the second reference data.

5. The method according to claim 1 or 4, wherein, The step of dynamically adjusting the initial dwell time of the target scanning channel to the corresponding target dwell time based on the second reference data includes: Determine the difference between a load parameter characterizing the load of the scanning channel of the wireless communication module and a standard setting value; different load parameters correspond to different standard setting values, and the load parameter includes at least one of channel load rate, relative utilization rate, and channel interference rate; Based on the difference, the initial dwell time of each scanning channel is adjusted to the corresponding target dwell time; wherein, the larger the difference, the greater the adjustment range of the corresponding dwell time.

6. The method according to claim 5, wherein, The step of adjusting the initial dwell time of each scanning channel to the corresponding target dwell time based on the difference includes: In response to the load parameter being greater than the standard setting value, a first adjustment range is determined based on the difference, and the initial dwell time of the scanning channel is increased by the first adjustment range to obtain the target dwell time corresponding to the scanning channel; In response to the load parameter being less than the standard setting value, a second adjustment range is determined based on the difference, and the initial dwell time of the scanning channel is reduced by the second adjustment range to obtain the target dwell time corresponding to the scanning channel.

7. The method according to claim 1 or 4, wherein, The step of dynamically adjusting the initial dwell time of the target scanning channel to the corresponding target dwell time based on the second reference data includes: The target scanning channel is determined based on load parameters characterizing the load of the scanning channels of the wireless communication module; the number of the target scanning channels is less than the number of individual scanning channels. Based on the number of target scanning channels and the difference between the load parameters and the standard setting value, the initial dwell time of each target scanning channel is adjusted to the corresponding target dwell time.

8. The method according to claim 1, wherein, The step of controlling the wireless communication module to perform a scanning operation on the target scanning channel with a corresponding target dwell time includes: In response to a channel scanning request from the operating system, the scanning parameters of the target scanning channel are obtained based on the target scanning driver, and the scanning parameters are provided to the scanning firmware of the wireless communication module; the scanning parameters include at least the target dwell time of the target scanning channel; The wireless communication module is controlled to sequentially reside on each target scanning channel for the corresponding target dwell time in order to obtain the corresponding beacon frame and / or probe response frame.

9. The method of claim 8, further comprising at least one of the following: In response to the presence of an unscanned target scanning channel after a target set time, the scanning information of the unscanned target scanning channel is provided to the scanning firmware of the wireless communication module to control the wireless communication module to rescan the unscanned target scanning channel; The channel scanning results obtained from the scanning operation are sent to the operating system of the electronic device for display in the target window area of ​​the operating system. The channel scanning results are obtained based on the beacon frame and / or the probe response frame.

10. An electronic device, comprising: The device body and a wireless communication module disposed on the device body, the wireless communication module being configured with corresponding driver and firmware programs, the driver and firmware programs being configured to perform the following operations: In response to the satisfaction of the channel scanning triggering condition, the initial dwell time of the wireless communication module of the electronic device in each scanning channel is configured based on the first reference data; The first reference data at least characterizes the usage data of the electronic device; Obtain second reference data, and dynamically adjust the initial dwell time of the target scanning channel to the corresponding target dwell time based on the second reference data; The second reference data at least characterizes the load status of the scanning channel of the wireless communication module, wherein the target scanning channel is at least one of the scanning channels; The wireless communication module is controlled to perform a scanning operation on the target scanning channel for a corresponding target dwell time.