Scanning control method and electronic equipment
By implementing multi-channel scanning and dynamic scanning configurations in electronic devices, the problem of low single-channel scanning efficiency in the prior art is solved, and the efficiency of target channel determination and multi-channel processing capability are improved.
Patent Information
- Application Number
- CN202311058755.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-28
AI Technical Summary
When existing electronic devices receive Wi-Fi signal, the process of determining the target channel through single-channel scanning is low, resulting in high power consumption and time overhead.
A scanning control method is provided, allowing electronic devices to scan and parse multiple channels simultaneously, and dynamically determine whether single-channel scanning or multi-channel scanning is used based on current location and environmental conditions. This method supports data analysis of single-channel and multi-channel scanning by configuring a signal processing link.
Improves the efficiency of electronic devices when determining target channels, reduces power consumption and time overhead, and supports simultaneous scanning processing of multiple channels.
Smart Images

Figure CN119545479A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of electronic devices, and in particular to a scanning control method and electronic device. Background Art
[0002] When receiving wireless signals based on Wi-Fi, the electronic device may determine a target channel for subsequent data communication through channel scanning. Exemplarily, the target channel may be a channel for communication using a preset target protocol type.
[0003] Generally, the channel scanning scheme may include single channel scanning. The 13 channels specified by the Wi-Fi related protocols are scanned in sequence, and the data obtained from each scan is parsed to determine the protocol type used by each channel. Then, the target channel is determined based on the channel using the target protocol type. This will result in a lack of efficiency in the process of the electronic device determining the target channel. Summary of the invention
[0004] The present application provides a scanning control method and an electronic device, which can enable the electronic device to support scanning and parsing of multiple channels at the same time. In addition, the electronic device can also use this solution to reasonably determine whether to perform single-channel scanning or multi-channel scanning.
[0005] In order to achieve the above technical objectives, this application adopts the following technical solutions:
[0006] In a first aspect, a scanning control method is provided, which is applied to an electronic device, the electronic device having a channel scanning capability, the channel scanning capability being used to determine a target channel in a current environment, the target channel being a channel for data transmission using a target protocol type. The electronic device provides the channel scanning capability by performing a single-channel scan or a multi-channel scan. The method comprises: the electronic device determines a scanning configuration according to a first parameter. The first parameter corresponds to the current location of the electronic device. The scanning configuration comprises any one of the following: a single-channel scanning configuration, a multi-channel scanning configuration. The electronic device performs the single-channel scan according to the scanning configuration, or the electronic device performs the multi-channel scan according to the scanning configuration. The single-channel scan is used to determine whether the scanned channel is the target channel, and the multi-channel scan is used to determine whether the target channel is included in the scanned multiple channels.
[0007] Based on this solution, the electronic device can determine whether single-channel scanning or multi-channel scanning is required according to the strategy related to the first parameter, and then provide a corresponding channel scanning function according to the above result according to the single-channel scanning or multi-channel scanning capability configured in the electronic device.
[0008] Optionally, the electronic device is configured with a first antenna, and the first antenna is used to obtain first sampled data. The electronic device is also configured with N signal processing links. Each of the signal processing links is used to process the data of a channel to determine whether the channel corresponding to the processed data is the target channel. N is an integer greater than or equal to 2. The execution of the single-channel scan includes: the electronic device obtains the first sampled data through the first antenna, and the first sampled data includes data of the first channel. The electronic device controls the first signal processing link included in the N signal processing links to power on, and the electronic device determines whether the first channel in the first sampled data is the target channel through the first signal processing link. In this way, the N signal processing links in the electronic device can support data parsing of the single-channel scanning of the electronic device.
[0009] Optionally, the electronic device is configured with a first antenna, and the first antenna is used to obtain the second sampled data. N signal processing links are configured in the electronic device. N is an integer greater than or equal to 2. Each of the signal processing links is used to process the data of a channel to determine whether the channel corresponding to the processed data is the target channel. Different signal processing links included in the N signal processing links process different channels for data. The execution of the multi-channel scan includes: the electronic device obtains the second sampled data through the first antenna, and the frequency band corresponding to the second sampled data covers at least the second channel and the third channel. The electronic device controls the M signal processing links included in the N signal processing links to power on. M is an integer greater than or equal to 2 and less than or equal to N. The electronic device determines whether the second channel and / or the third channel in the second sampled data is the target channel through the M signal processing links. In this way, the N signal processing links in the electronic device can support data parsing of multi-channel scanning of the electronic device.
[0010] Optionally, for each of the N signal processing links, the signal processing link includes: a frequency shift unit, a filtering unit coupled to the frequency shift unit, and a carrier sensing CCA unit coupled to the filtering unit. The frequency shift unit is used to perform frequency shift processing. When different frequency shift units included in the signal processing links perform frequency shift processing, the corresponding frequency shift lengths are different. The filtering unit is used to perform filtering processing, and the passing bandwidth of different filtering units included in the signal processing links is the data bandwidth of 1 channel. The CCA unit is used to determine whether the data segment input to the CCA unit is transmitted through the target protocol type. This scheme provides a specific composition and functional definition of a signal processing link. By configuring the N signal processing links in an electronic device, the simultaneous scanning and processing capability of up to N channels is achieved.
[0011] Optionally, the electronic device performs the multi-channel scan according to the scanning configuration. The M signal processing links include a second signal processing link. The electronic device controls the M signal processing links included in the N signal processing links to power on, including: the electronic device controls the second signal processing link to power on. The electronic device determines whether the second channel and / or the third channel in the second sampled data is the target channel through the M signal processing links, including: the frequency shift unit in the second signal processing link performs a first frequency shift process on the second sampled data. In the second sampled data after the first frequency shift process, the center frequency of the data corresponding to the second channel is 0MHz. The filtering unit in the second signal processing link performs filtering on the second sampled data after the first frequency shift process to obtain a second data segment corresponding to the second channel. The CCA unit in the second signal processing link performs carrier sensing on the second data segment to determine whether the second channel is the target channel.
[0012] Optionally, the electronic device performs the multi-channel scan according to the scanning configuration. The M signal processing links include a third signal processing link. The electronic device controls the M signal processing links included in the N signal processing links to power on, including: the electronic device controls the third signal processing link to power on. The electronic device determines whether the second channel and / or the third channel in the second sampled data is the target channel through the M signal processing links, including: the frequency shift unit in the third signal processing link performs a second frequency shift process on the second sampled data. In the second sampled data after the second frequency shift process, the center frequency of the data corresponding to the third channel is 0MHz. The filtering unit in the third signal processing link performs filtering on the second sampled data after the second frequency shift process to obtain a third data segment corresponding to the third channel. The CCA unit in the third signal processing link performs carrier sensing on the third data segment to determine whether the third channel is the target channel.
[0013] In this way, based on the composition of the channel processing link provided in the above implementation, the electronic device can synchronously process the sampling data of multi-channel scanning including at least the second channel and the third channel, so as to achieve digital analysis of the data of each channel in the multi-channel scanning channel.
[0014] Optionally, the frequency shift unit includes a digital down-conversion DDC unit, and the filtering unit includes a low-pass filter LPF.
[0015] It is understandable that, in some embodiments, the frequency shift unit and / or the filter unit can realize the above functions through specific devices. In other embodiments, the frequency shift unit and / or the filter unit can also be configured in the electronic device through a logic implementation similar to a DDC unit and LPF.
[0016] Optionally, before the sampled data is input into the N signal processing links, the method further includes: the electronic device performs down-conversion processing on the sampled data acquired by the first antenna so that the center frequency of the sampled data after the down-conversion processing is 0 MHz. For example, the down-conversion processing may include down-conversion processing of analog signals. In some implementations, the down-conversion processing of analog signals may be implemented by a mixed (MIX) processing process in an RF module.
[0017] Optionally, the electronic device is further configured with a digital gain control unit, and the method further comprises: the electronic device performs digital amplification processing on the data of the target channel through the digital gain control unit. In this way, after the digital amplification processing, the data segment in the target channel can be specifically amplified, for example, from 4 bits to 7 bits, so that the subsequent analysis of the data in the target channel is more accurate.
[0018] Optionally, the first parameter includes a first cell identifier, and the first cell identifier is the cell identifier of the cellular network to which the electronic device is currently connected. The electronic device determines the scanning configuration based on the first parameter, including: the electronic device determines the scanning configuration based on the first cell identifier and a preconfigured first correspondence. The first correspondence includes a correspondence between at least one cell identifier and the scanning configuration, and the at least one cell identifier includes the first cell identifier. In this way, the electronic device can accurately determine the scanning configuration through the cell identifier corresponding to the current location. In some implementations, the first correspondence may be determined by the electronic device based on historical usage data. In other implementations, the first correspondence may also be preconfigured in the electronic device, or obtained from a cloud server before use.
[0019] Optionally, the first parameter includes a first cell identifier, and the first cell identifier is the cell identifier of the cellular network to which the electronic device is currently accessing. The electronic device determines the scanning configuration according to the first parameter, including: the electronic device determines the number of wireless access points AP corresponding to the current location according to the first cell identifier and a preconfigured second correspondence. The second correspondence includes a correspondence between at least one cell identifier and the number of APs, and the at least one cell identifier includes the first cell identifier. The electronic device determines the scanning configuration according to the number of APs corresponding to the current location. This solution implementation provides another solution implementation for determining the scanning configuration according to the cell identifier of the cellular network currently accessing.
[0020] Optionally, the first parameter includes a first hardware parameter, and the first hardware parameter includes a hardware parameter of at least one AP. The at least one AP includes an AP in the environment where the electronic device is currently located that communicates with the electronic device through the 2.4 GHz frequency band. The electronic device determines the scanning configuration according to the first parameter, including: the electronic device determines the number of APs corresponding to the first hardware parameter according to the first hardware parameter. The electronic device determines the scanning configuration according to the number of APs.
[0021] Thus, a scheme for determining scanning configuration according to AP hardware parameters is provided, wherein the hardware parameters include at least one of the following: media access control (MAC) address, service set identifier (SSID), basic service set identifier (BSSID), and extended service set identifier (ESSID).
[0022] Optionally, the electronic device determines the scanning configuration according to the number of APs, including: the electronic device determines that the scanning configuration includes a single-channel scanning configuration according to the number of APs being greater than a preset AP number threshold. Alternatively, the electronic device determines that the scanning configuration includes a multi-channel scanning configuration according to the number of APs being less than a preset AP number threshold. In this way, in complex scenarios with a large number of APs, a single-channel scan can be used to perform a detailed scan of the current scene to improve accuracy. Correspondingly, in simpler scenarios with a small number of APs, multi-channel scanning can be used to further improve scanning efficiency.
[0023] Optionally, before the electronic device determines the scanning configuration according to the number of APs, the method further includes: the electronic device determines to continue scanning according to current service requirements.
[0024] Optionally, the current service includes a positioning service, and a third correspondence is preconfigured in the electronic device, the third correspondence including at least one correspondence between a hardware parameter and location information. When the current service demand corresponds to no longer scanning, the method includes: the electronic device provides the positioning service according to the third correspondence and the first hardware parameter. The first hardware parameter is included in the at least one hardware parameter.
[0025] In this way, after the hardware parameters of the AP are acquired, the solution corresponding to the third corresponding relationship can be implemented, and accurate service support can be provided for high-precision services by performing channel scanning again.
[0026] Optionally, before the electronic device determines the number of APs corresponding to the first hardware parameter based on the first hardware parameter, the method further includes: the electronic device performs a channel scan of a preset channel to determine a target channel in the preset channel. The hardware parameters of the AP that uses the target channel to communicate with the electronic device are obtained as the first hardware parameters. In this way, by preferentially scanning the preset channels configured in the electronic device, channels with a higher frequency of use can be preferentially scanned. This improves the efficiency of determining the target channel overall.
[0027] Optionally, when the target channel is not included in the preset channel, the method further includes: performing a preset single-channel or multi-channel scan on all channels in the 2.4 Hz frequency band to determine the number of APs and / or target channels at the current location. Generally, when the target channel is not included in the preset channel, the electronic device may currently be in a new location and is unaware of the APs and target channels distributed in the current environment. Then, through this solution, the electronic device can perform a comprehensive scan of all channels in the current environment based on the configured measurements, thereby obtaining AP / target channel distribution information corresponding to the location.
[0028] In some embodiments, the first corresponding relationship, the second corresponding relationship, and the third corresponding relationship involved in the above implementation, the AP quantity threshold and other parameters pre-configured in the electronic device can be flexibly configured based on the electronic device's historical usage data or cloud data. For example, the historical usage data of the local device can be obtained and updated by the electronic device according to the implementation of the above comprehensive scanning solution for the new environment.
[0029] In a second aspect, an electronic device is provided, the electronic device comprising: a first antenna, a memory and one or more processors. The memory is coupled to the processor. The first antenna is coupled to the processor. The memory is used to store a computer program code, the computer program code comprising a computer instruction, and when the processor executes the computer instruction, the electronic device executes the method provided in the first aspect and any possible design thereof.
[0030] In a third aspect, a chip system is provided, which is applied to an electronic device. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from a memory of the electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the method provided in the first aspect and any possible design thereof.
[0031] Optionally, the chip system is configured with at least two signal processing links, and the at least two signal processing links are used to perform signal processing on data of different channels to determine whether the data transmitted on the corresponding channel uses a preset target protocol type. For example, the chip system may correspond to a baseband module or baseband processor configured in an electronic device.
[0032] In a fourth aspect, the present application also provides a computer-readable storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the technical solution provided in the above-mentioned first aspect and any possible implementation thereof.
[0033] In a fifth aspect, the present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the technical solution provided in the above-mentioned first aspect and any possible implementation thereof.
[0034] It can be understood that the solutions provided in the second aspect to the fifth aspect of the present application can respectively correspond to the first aspect and any possible design thereof, so the beneficial effects that can be achieved are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram of a wireless communication scenario;
[0036] Figure 2 This is a schematic diagram of channel division in the 2.4G frequency band;
[0037] Figure 3 A schematic diagram of a type of protocol that may be used in a 2.4G band communication process;
[0038] Figure 4 A schematic diagram of a wireless communication scenario;
[0039] Figure 5 A schematic diagram of the composition of an electronic device;
[0040] Figure 6 A schematic diagram of determining a target channel for a single channel scan;
[0041] Figure 7 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0042] Figure 8 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0043] Fig. 9 A logical connection diagram of an electronic device provided in an embodiment of the present application;
[0044] Fig.10A schematic diagram of multi-channel sampling provided in an embodiment of the present application;
[0045] Fig.11 A schematic diagram of data processing logic in a multi-channel scanning process provided by an embodiment of the present application;
[0046] Fig.12 A schematic diagram of data processing logic in a multi-channel scanning process provided by an embodiment of the present application;
[0047] Fig.13 A schematic diagram of data processing logic in a multi-channel scanning process provided by an embodiment of the present application;
[0048] Fig.14 A logical connection diagram of an electronic device provided in an embodiment of the present application;
[0049] Fig.15 A logical connection diagram of an electronic device provided in an embodiment of the present application;
[0050] Fig.16 A logical connection diagram of an electronic device provided in an embodiment of the present application;
[0051] Fig.17 A schematic diagram of the logical composition of an electronic device provided in an embodiment of the present application;
[0052] Fig.18 A logic diagram of a scanning control method provided in an embodiment of the present application;
[0053] Fig.19 A logic diagram of a scanning control method provided in an embodiment of the present application;
[0054] Fig. 20 A schematic diagram of a channel scanning scenario provided in an embodiment of the present application;
[0055] Fig.21 A schematic diagram of a channel scanning scenario provided in an embodiment of the present application;
[0056] Fig. 22 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0057] Fig.23 A schematic diagram of the composition of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] At present, most electronic devices with wireless communication functions can communicate based on wireless fidelity (Wi-Fi) networks, referred to as Wi-Fi communication. The frequency bands corresponding to Wi-Fi communication can include 2.4 GHz bands and 5 GHz bands. Take Wi-Fi communication, in which the frequency band corresponding to Wi-Fi communication is 2.4 GHz band, as an example. The 2.4 GHz band can include all or part of the frequency bands between 2400 MHz and 2500 MHz.
[0059] refer to Figure 1 , showing an example of a Wi-Fi communication scenario.
[0060] like Figure 1 As shown, device 21 can be used as a Wi-Fi access device (or receiving device). The environment in which device 21 is located may include a Wi-Fi network created by one or more devices. The device that creates the Wi-Fi network can be called a creating device.
[0061] For example, in Figure 1 In the example of , the created device may include device 11, device 12, and device 13.
[0062] Among them, device 11 can create Wi-Fi network 1, so that device 11 can communicate with device 21 through Wi-Fi network 1. Device 12 can create Wi-Fi network 2, so that device 12 can communicate with device 21 through Wi-Fi network 2. Device 13 can create Wi-Fi network 3, so that device 13 can communicate with device 21 through Wi-Fi network 3.
[0063] It is understandable that, for any creating device (such as device 11, device 12 or device 13), when communicating with device 21 through the corresponding Wi-Fi network, the corresponding channel (Channel) and protocol type can be used for data transmission.
[0064] As an example, refer to Figure 2 , which is an example of dividing Wi-Fi communication channels in the 2.4 GHz band.
[0065] Combination Figure 1 For example, in the process of device 11, device 12 and / or device 13 communicating with device 21 through the corresponding Wi-Fi network, the following may be used: Figure 2 Any channel in the communication channel can be used to transmit data to the device 21.
[0066] like Figure 2As shown in the figure, the 2.4GHz Wi-Fi frequency band can be divided into 14 channels. The coverage frequencies are arranged from low to high as channel 1, channel 2, channel 3, ..., channel 14. Among them, channels 1 to 13 are commonly used channels. Channel 14 is generally not used for data transmission.
[0067] In the channels 1 to 13, and 14, the bandwidth of each channel is 22 MHz.
[0068] The interval between the starting frequencies of two adjacent channels from channel 1 to channel 13 is 5MHz. For example, the frequency of channel 1 covers 2401MHz to 2423MHz. The frequency of channel 2 covers 2406MHz to 2428MHz. And so on.
[0069] In such Figure 2 In the example, the center frequency of each channel is also shown. For example, the center frequency of channel 1 is 2412MHz, the center frequency of channel 2 is 2417MHz, the center frequency of channel 3 is 2422MHz, the center frequency of channel 4 is 2427MHz, the center frequency of channel 5 is 2432MHz, the center frequency of channel 6 is 2437MHz, the center frequency of channel 7 is 2442MHz, the center frequency of channel 8 is 2447MHz, the center frequency of channel 9 is 2452MHz, the center frequency of channel 10 is 2457MHz, the center frequency of channel 11 is 2462MHz, the center frequency of channel 12 is 2467MHz, the center frequency of channel 13 is 2472MHz, and the center frequency of channel 14 is 2484MHz.
[0070] In addition, when communicating over a Wi-Fi network, different communication connections may use different protocol types.
[0071] refer to Figure 3 , showing examples of the types of protocols that may be used in a 2.4 GHz band Wi-Fi network.
[0072] like Figure 3 As shown, in the 2.4 GHz band Wi-Fi communication process, the available protocol types may include 802.11b, 802.11g, 802.11n, etc.
[0073] Combined with the above Figures 1 to 3 Description, Figure 4 A specific example of using different channels and protocol types in different Wi-Fi communication processes is provided.
[0074] like Figure 4As shown, in this example, device 11 can communicate with other devices (such as device 21) using the protocol type of 802.11g on channel 3. Device 12 can communicate with other devices (such as device 21) using the protocol type of 802.11n on channel 6. Device 13 can communicate with other devices (such as device 21) using the protocol type of 802.11b on channel 9.
[0075] During the Wi-Fi communication process, the device 21 can achieve Wi-Fi communication with the device 11, the device 12 and / or the device 13 through the cooperation of various components therein. Take the scenario where the device 21 receives data as an example.
[0076] Figure 5 An example of the composition of a device 21 is provided. Figure 5 The composition shown can support device 21 to receive data via a Wi-Fi network.
[0077] like Figure 5 As shown, the device 21 may be configured with an antenna 51 , an RF module 52 , an AD conversion unit 53 , and a baseband module 54 .
[0078] The working frequency band of antenna 51 covers the 2.4 GHz frequency band. Antenna 51 can be used for Figure 2 For example, in some implementations, antenna 51 can be used to receive signals in the frequency bands corresponding to the channels shown. Figure 2 Data of one channel among channels 1 to 13 is shown.
[0079] The RF module 52 is used to perform radio frequency domain (or analog domain) processing. The radio frequency domain processing may include signal amplification, analog filtering, etc. In the present application, the analog signal processed in the radio frequency domain may be referred to as a radio frequency modulated signal.
[0080] The AD conversion unit 53 is used to perform digital sampling on the analog signal, thereby converting the RF modulated signal into a corresponding digital modulated signal.
[0081] The baseband module 54 is used to perform digital processing on the digital modulation signal.
[0082] Exemplarily, digital processing may include digital analysis of digital modulation signals. For example, the digital analysis may include analyzing the leading and / or frame header information of the digital modulation signal, thereby determining the protocol type used by the received data. According to the determined protocol type, the device 21 can analyze the data received on the channel to obtain the valid data carried therein. In the following examples, the digital modulation signal is referred to as a digital signal.
[0083] In some scenarios, the device 21 may filter data in the current environment according to a pre-configured target protocol type.
[0084] It is understandable that if Figure 4 As shown, there may be multiple different Wi-Fi networks in the environment near the device 21. The creation device that creates different Wi-Fi networks may attempt to communicate with the device 21 through different protocol types and / or channels.
[0085] Correspondingly, when the device 21 needs to implement a certain function (such as a target function) through a Wi-Fi network, the target protocol type corresponding to the function can be pre-configured to screen and determine the target channel for data transmission using the target protocol type from multiple Wi-Fi networks distributed in the current environment. The target function implemented using the Wi-Fi network may include indoor positioning, indoor precise navigation, device proximity discovery, etc.
[0086] In this way, the device 21 can determine the data transmission channel (i.e., the target channel) and the protocol type (i.e., the target protocol type) used in the data transmission process required to achieve the target function. Thus, the device 21 can continue to receive data on the target channel and quickly parse the data according to the target protocol type, thereby achieving the purpose of supporting the target function.
[0087] Take the target protocol type as 802.11b as an example.
[0088] In order to determine Figure 4 In the environment shown, using the target channel of the target protocol type, the device 21 can respectively Figure 2 The channels shown are analyzed for single channel scan.
[0089] Exemplary, reference Figure 6 , which is an example of a common single-channel scan.
[0090] Device 21 may start scanning and parsing from channel 1.
[0091] For example, the device 21 can control the antenna 51 to receive electromagnetic waves in the frequency band corresponding to channel 1 and convert the electromagnetic waves into analog signals. Figure 4 In the scenario shown, no device is transmitting data through channel 1, and the corresponding received signal does not include valid data. In this way, the signal strength of channel 1 is weak or no data can be received. Then, device 21 can determine that there is no data transmission on channel 1. Continue scanning and analyzing the next channel (such as channel 2).
[0092] The scanning process for channel 2 is similar, and then device 21 can continue to scan channel 3.
[0093] like Figure 6 As shown, the device 21 can control the antenna 51 to receive the electromagnetic wave of the frequency band corresponding to the channel 3, and convert the electromagnetic wave into an analog signal (such as the antenna signal a1). That is, by scanning the channel 3, the antenna signal a1 is obtained. Figure 4 In the illustrated scenario, there is a device 11 communicating with a device 21 via a channel 3, and the antenna signal a1 may include valid data. The device 21 may continue to perform subsequent processing.
[0094] The antenna 51 can transmit the antenna signal a1 to the RF module 52. The RF module 52 can perform RF domain processing on the antenna signal a1 to obtain an analog signal (such as RF modulated signal b1) after amplification, mixing (MIX), and filtering. The RF module 52 can send the RF modulated signal b1 to the AD conversion unit 53. The AD conversion unit 53 performs digital sampling on the RF modulated signal b1 to obtain the corresponding digital signal c1. The digital signal c1 can be transmitted to the baseband module 54 for analysis. For example, the baseband module 54 can parse the preamble and / or frame header information of the digital signal c1 to determine that the protocol type used by the signal received by the channel 3 is 802.11g.
[0095] In this way, the device 21 can determine that although there is data transmission on the current channel 3, the target protocol type is not used, so the channel 3 is not the target channel.
[0096] Device 21 may continue to scan and analyze other channels.
[0097] For example, when channel 6 is scanned, the corresponding antenna signal a2 can be obtained. Then, the RF module 52 performs RF domain processing on the antenna signal a2 to obtain the RF modulation signal b2. After analog-to-digital conversion, the digital signal c2 corresponding to the RF modulation signal b2 is obtained. Based on the analysis of the digital signal c2, it can be determined that the protocol type used by the signal received by the channel 6 is 802.11n.
[0098] For another example, when channel 9 is scanned, the corresponding antenna signal a3 can be obtained. Then, the RF module 52 performs RF domain processing on the antenna signal a3 to obtain the RF modulation signal b3. After analog-to-digital conversion, the digital signal c3 corresponding to the RF modulation signal b3 is obtained. Based on the analysis of the digital signal c3, it can be determined that the protocol type used by the signal received by the channel 9 is 802.11b.
[0099] In this way, device 21 can determine that channel 9 is a target channel using the target protocol type.
[0100] In the implementation of the above solution, the device 21 scans and analyzes one channel each time to determine the protocol type used by the channel. This solution can be called a single channel scanning solution.
[0101] Based on the single-channel scanning scheme, although the target channel using the target protocol type can be finally determined, the single-channel scanning performed before scanning channel 9 (i.e., the target channel) is invalid. This results in significant and invalid power consumption and time overhead. When the channel number of the target channel is greater than 9 (such as 10, 13, etc.), the invalid power consumption and time overhead are even more significant.
[0102] In this regard, an embodiment of the present application provides a multi-channel scanning solution, so that an electronic device (such as device 21) can perform simultaneous scanning and matching processing of two or more channels according to actual conditions. This enables the electronic device to quickly determine the target channel for data transmission using the target protocol type in the current environment. In some embodiments of the present application, based on the solution provided by the present application, the electronic device can also support single-channel scanning according to the current scene requirements.
[0103] The scheme is described in detail below with reference to the accompanying drawings.
[0104] It should be noted that the electronic devices involved in the embodiments of the present application may include at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, or a smart city device. The embodiments of the present application do not impose any special restrictions on the specific type of the electronic device.
[0105] Exemplarily, the electronic device may have Wi-Fi communication capability in the 2.4 GHz frequency band.
[0106] As an example, refer to Figure 7 , is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application.
[0107] like Figure 7As shown, the electronic device may include a processor 710, an external memory interface 720, an internal memory 721, a universal serial bus (USB) connector 730, a charging management module 740, a power management module 741, a battery 742, an antenna 1, an antenna 2, a mobile communication module 750, a wireless communication module 760, an audio module 770, a speaker 770A, a receiver 770B, a microphone 770C, an earphone interface 770D, a sensor module 780, a button 790, a motor 791, an indicator 792, a camera module 793, a display screen 794, and a subscriber identification module (SIM) card interface 795, etc. The sensor module 780 may include a pressure sensor 780A, a gyroscope sensor 780B, an air pressure sensor 780C, a magnetic sensor 780D, an acceleration sensor 780E, a distance sensor 780F, a proximity light sensor 780G, a fingerprint sensor 780H, a temperature sensor 780J, a touch sensor 780K, an ambient light sensor 780L, a bone conduction sensor 780M, and the like.
[0108] The processor 710 may include one or more processing units, for example, the processor 710 may include an application processor (AP) 710a, a modem processor (Modem), a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor (BP or BBP) 710b, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0109] The processor 710 can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0110] The processor 710 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 710 may be a cache memory. The memory may store instructions or data that have been used or are frequently used by the processor 710. If the processor 710 needs to use the instruction or data, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 710, and thus improves the efficiency of the system.
[0111] In some embodiments, the processor 710 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The processor 710 may be connected to a touch sensor, an audio module, a wireless communication module, a display screen, a camera module, and the like through at least one of the above interfaces.
[0112] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0113] It should be noted that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0114] In such Figure 7 In the example, the wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 750, wireless communication module 760, modem processor and baseband processor 710b.
[0115] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0116] The mobile communication module 750 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The mobile communication module 750 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 750 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 750 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 750 can be set in the processor 710. In some embodiments, at least some of the functional modules of the mobile communication module 750 can be set in the same device as at least some of the modules of the processor 710.
[0117] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 770A, a receiver 770B, etc.), or displays an image or video through a display screen 794. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 710, and may be set in the same device as the mobile communication module 750 or other functional modules. For example, the modem processor may be integrated in the baseband processor 710b.
[0118] The wireless communication module 760 can provide wireless communication solutions including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), Bluetooth low energy (BLE), ultra wide band (UWB), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to electronic devices. The wireless communication module 760 can be one or more devices integrating at least one communication processing module. The wireless communication module 760 receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 710. The wireless communication module 760 can also receive the signal to be sent from the processor 710, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through antenna 2.
[0119] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 750, and the antenna 2 is coupled to the wireless communication module 760, so that the electronic device can communicate with the network and other electronic devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).
[0120] Based on Figure 7 The composition of the electronic device shown in FIG. 1 can enable the electronic device to implement the single-channel scanning in the above example. Figure 7 The electronic device shown can also be used to support multi-channel scanning and analysis at the same time. The specific implementation will be described in detail later.
[0121] It should be pointed out that if Figure 7 The components of the electronic device shown are only examples and do not constitute a limitation on the electronic device. In other embodiments, the electronic device may also have other components.
[0122] Exemplary, reference Figure 8 , is a schematic diagram of the composition of another electronic device provided in an embodiment of the present application.
[0123] like Figure 8As shown, in this example, the electronic device may include an antenna module 801, an RF module 802, an AD conversion unit 803, a control module 805, and a baseband module 840, etc.
[0124] The antenna module 801 may correspond to Figure 7 Antenna 1 and / or antenna 2 are shown.
[0125] As an implementation, the antenna module 801 may include one or more antennas for transmitting and receiving wireless signals. The antenna module 801 may include at least one 2.4 GHz antenna (or Wi-Fi antenna). The operating frequency band of the 2.4 GHz antenna may include a 2.4 GHz frequency band.
[0126] The RF module 802 may be disposed between the antenna module 801 and the baseband module 840 to perform radio frequency domain processing on antenna signals. In some implementations, the RF module 802 may be a collection of devices and cables for performing analog signal processing between the antenna module 801 and the baseband module 840.
[0127] Exemplarily, the RF module 802 may include an RF transceiver, a low noise amplifier (Low Noise Amplifier, LNA), an RF mixer (MIX), a low pass filter (Low Pass Filter, LPF), etc.
[0128] In some embodiments, the LNA may have gain adjustment capability.
[0129] Exemplarily, the RF module 802 can adjust the gain used in the amplification process in different scenarios according to the instructions of the baseband module 840, so that the antenna signal can be amplified to the maximum extent without truncation of valid data. In some implementations, the LNA can have a linear amplification interval, within which the gain provided by the LNA has a linear relationship with the signal power before and after the amplification process. In this linear amplification interval, the relevant parameters of the antenna signal (such as the received signal strength (RSSI)) can be accurately determined according to the gain used by the current LNA. Correspondingly, outside the linear amplification interval, the signal power before and after the amplification process does not have a strict linear relationship. The electronic device can accurately determine the specific parameter value of the antenna signal received by the current antenna according to the correspondence between the gain used by the LNA of the current model pre-configured and the relevant parameters of the antenna signal (such as RSSI).
[0130] In other embodiments, the RF mixer in the RF module 802 can provide down-conversion processing for analog signals. The down-conversion processing for analog signals can also be referred to as analog down-conversion processing. For example, through the analog down-conversion processing, the RF module 802 can adjust the center frequency of the collected data obtained by the antenna module 801 from the original greater than 2 GHz to 0 MHz.
[0131] The AD conversion unit 803 is used to convert the radio frequency signal (analog signal) into a digital signal. In different implementations, the digital sampling frequency of the AD conversion unit 803 may be different. For example, the digital sampling frequency of the AD conversion unit 803 may be 80 MHz, 44 MHz, etc.
[0132] In different implementations of the present application, the AD conversion unit 803 may be integrated into the RF module 802 , or the AD conversion unit 803 may be integrated into the baseband module 840 , or may be separately configured between the RF module 802 and the baseband module 840 .
[0133] The baseband module 840 may include: Figure 7 The baseband processor 710b is shown. The baseband module 840 can be used to perform digital processing of signals.
[0134] In this application, if Figure 8 As shown, the baseband module 840 may be specifically configured with a signal division module 841, a matching module 842, a calculation module 843, an analysis module 844, an automatic gain control (AGC) unit 845, and the like.
[0135] The signal division module 841 may include a frequency shift unit group. Taking multi-channel scanning as an example, the frequency shift unit group may be used to implement frequency shift processing on the sampled data of the collected data segments including multiple channels.
[0136] In some embodiments, the frequency shift unit group can be implemented by multiple digital downconverter (DDC) units. For example, the frequency shift unit group can include DDC1 to DDCn. Among them, the frequency shift capabilities of different DDCs are relatively fixed, and the signal division module can control the DDC power-on operation of different channels under the control of the control module 805 in different scenarios, thereby realizing corresponding frequency shift processing on different channels.
[0137] The signal division module 841 may further include a filtering unit group. The filtering unit group is used to filter the sampled data after the frequency shift processing respectively, so as to obtain data segments corresponding to two or more channels included in the sampled data based on the sampled data after the frequency shift processing.
[0138] Exemplarily, the filter unit group is composed of a plurality of filter units. The number of filter units may correspond to the frequency shift unit group. For example, the number of filter units may be the same as the number of frequency shift units. In some implementations, the passbands of the respective filter units may be the same.
[0139] In the present application, each filter unit can form a signal division link with a frequency shift unit group. The signal division link can be used to separate and obtain a data segment corresponding to a channel from the sampled data.
[0140] In some embodiments, the filter unit group may be implemented by a plurality of low pass filters (LPF) having the same pass frequency band. For example, the filter unit group may include LPF1 to LPFn. In different embodiments, the LPF may adopt a finite impulse response (FIR) filter and / or an infinite impulse response (IIR) filter.
[0141] The matching module 842 may be used to perform matching processing on the data segment corresponding to each channel, so as to determine the protocol type used by the data segment. The matching processing may be performed based on the Baker code of the target protocol type.
[0142] Exemplarily, in some embodiments, for each data segment corresponding to a channel, the matching module 842 may perform correlation peak matching on the data segment and the Baker code of the target protocol type. When the peak value of the correlation peak is greater than the corresponding quantity threshold, the corresponding matching is successful. That is, the transmission of the data segment uses the target protocol type, and the channel used to receive the data segment can be the target channel.
[0143] In other embodiments, for the data segment corresponding to any channel, the matching module 842 can use a sliding window to perform sampling and matching on the data segment. When the data in a window matches the Baker code of the target protocol type, the corresponding counter is incremented by 1. The matching module 842 can continue to slide the window, resample on the data segment, and continue to match the data in the new window with the Baker code of the target protocol type. When the match is successful, the counter is incremented by 1. The cycle is repeated until the value of the counter reaches a preset quantity threshold, and the corresponding data segment is successfully matched with the target protocol type. That is, the transmission of the data segment uses the target protocol type, and the channel used to receive the data segment can be the target channel.
[0144] Alternatively, when the sliding window slides to the end of the data segment of the channel, the value of the counter still does not reach the preset quantity threshold, then the data segment fails to match the target protocol type, that is, the transmission of the data segment does not use the target protocol type.
[0145] In a specific implementation, the function of the matching module 842 can be implemented by a listening unit group with carrier sensing capability. For example, the listening unit group can include two or more clear channel assessment (CCA) units. For example, the listening unit group can include CCA1 to CCAn.
[0146] In some embodiments of the present application, the number of CCAs in the matching module 842 may be the same as the number of DDCs in the frequency shift unit group and / or the number of LFPs in the filter unit group. At the same time, a DDC, an LFP, and a CCA may jointly implement the function of screening a channel data segment from the sampled data and carrier sensing to determine whether it is the target channel. In the present application, the CCA, LPF, and DDC used to process a channel may constitute a signal processing link.
[0147] In addition, in the present application, each signal processing link may correspond to a CCA identifier. The CCA identifier may be implemented by a high level / low level, or 0 / 1. The CCA identifier may be used to indicate whether the data segment processed on the current signal processing link is data transmitted via the target protocol type.
[0148] Take the CCA mark as an example, which is implemented through high level / low level.
[0149] When the CCA flag is high, it indicates that the data segment / the channel of the data segment obtained by the current signal processing link screening uses the target protocol type. Correspondingly, when the CCA flag is low, it indicates that the data segment / the channel of the data segment obtained by the current signal processing link screening does not use the target protocol type.
[0150] Take the implementation of CCA identification through 0 / 1 as an example.
[0151] When the CCA flag is 1, it indicates that the data segment / the channel of the data segment obtained by the current signal processing link screening uses the target protocol type. Correspondingly, when the CCA flag is 0, it indicates that the data segment / the channel of the data segment obtained by the current signal processing link screening does not use the target protocol type.
[0152] In the following example, the CCA identification is implemented through 0 / 1.
[0153] In such Figure 8During the initialization of each component in the electronic device shown, the CCA flag of each signal processing link can be configured to 0.
[0154] After the matching module 842 determines that the match on a certain signal processing link is successful, the CCA flag of the signal processing link may be configured as 1, so that other modules can identify the target channel according to the CCA flag.
[0155] It should be noted that, in some cases, the matching module 842 may successfully match two or more data segments through carrier sensing of each CCAs.
[0156] Then, the matching module 842 may only configure the CCA flag of the earliest received data segment among these data segments to 1. The CCA flags of other data segments remain 0. That is, the channel of the earliest received data segment transmitted using the target protocol type is used as the target channel.
[0157] Alternatively, the matching module 842 may configure the CCA identifiers of all successfully matched data segments to 1. Correspondingly, when the electronic device needs to determine the target channel, the target channel may be selected according to the relevant parameters (such as RSSI) corresponding to each of the multiple channels whose CCA identifiers are configured to 1, according to the actual situation. For example, the channel with the largest RSSI is selected as the target channel.
[0158] The above Figure 8 The composition and working mechanism of the signal division module 841 and the matching module 842 are briefly described. In this way, in the multi-channel sampling process, the data segments of each channel are screened according to the sampled data, and it is determined whether the channel of each data segment is the target channel.
[0159] It should be pointed out that in the example provided in the embodiment of the present application, the signal division module 841 includes multiple DDCs and LPFs, and the matching module 843 includes multiple CCAs. In the specific implementation process, the signal division module 841 and / or the matching module 843 may not be set or may not be configured completely according to the above hardware composition. For example, the functions of DDC, LPF or CCA in the signal division module 841 and / or the matching module 843 can be a chip or circuit with logic implementation capabilities, which implements its frequency shift function, filtering function or carrier sensing function based on the corresponding code.
[0160] In such Figure 8 In the example of , the electronic device may also be configured with a control module 805. The control module 805 may be used to manage single-channel scanning or multi-channel scanning according to actual conditions.
[0161] For example, in Figure 8In the example of FIG. 8 , the control module 805 is used to control the upper layer implementation of various functions of the electronic device. For example, the control module 805 can be used to control the enabling of various components in the baseband module 840. In some implementations, the functions of the control module 805 may include: Figure 7 An application processor 710a is shown.
[0162] During multi-channel scanning, the control module 805 can be used to control the DDC, LPF and CCA in the baseband module 840 (i.e., the signal processing link in the working state) through control signals, thereby achieving a corresponding number of single-channel or multi-channel scans.
[0163] As an example, the control module 805 may be coupled to each of DDC1 to DDCn, each of LPF1 to LPFn, and each of CCA1 to CCAn through control signal lines.
[0164] In actual operation, the control module 805 may determine that m channels need to be used for synchronous scanning according to the current environment and a preset strategy, where m is a positive integer less than or equal to n.
[0165] When m is equal to 1, the electronic device may perform single-channel scanning. Correspondingly, when m is greater than 1, multi-channel scanning may be performed.
[0166] Take m greater than 1 and the electronic device performing multi-channel scanning as an example.
[0167] The control module 805 can enable m DDCs from DDC1 to DDCn to power on and work through the control signal line, while other DDCs are not powered on. This is to facilitate m frequency shift processing of the sampled data through the m DDCs. This may include a frequency shift processing of 0 MHz (i.e., no shift in the frequency domain). It is understandable that, since the frequency shift lengths of the frequency shift processing provided by different DDCs are different, the data segments covered by the center frequency points of the sampled data after the m frequency shift processing are extended to both sides by 11 MHz can correspond to data transmitted in different channels.
[0168] The control module 805 can enable m LPFs from LPF1 to LPFn to power on and other LPFs to not power on through the control signal line, so as to filter the m frequency-shifted sampled data through the m LPFs respectively, and then obtain the data segments corresponding to the m channels.
[0169] The control module 805 can enable m CCAs from CCA1 to CCAn to be powered on and other CCAs to be powered off through the control signal line, so as to match the acquired data segments of m channels through the m CCAs respectively, thereby determining whether the target channel is included in the m channels corresponding to the m data segments.
[0170] It can be understood that under the control of the control module 805, m DDCs, m LPFs and m CCAs can be the DDCs, LPFs and CCAs of m signal processing links. This enables the enabling control of m signal processing links, so that the baseband module 840 can smoothly implement the analysis and processing of the sampled data of m channels. Then, through a multi-channel scanning solution, the target channel using the target protocol type can be quickly determined through a small number of scanning and parsing. The CCA identifier of the target channel can be configured as 1.
[0171] like Figure 8 As shown, the electronic device may further include a parsing module 844, a calculating module 843 and an ACG unit 845.
[0172] The parsing module 844 may determine the target channel from the channel of the data segment corresponding to the signal processing link with the CCA identifier of 1. The parsing module 844 may also parse the data segment of the target channel and other data received on the target channel according to the target protocol type, thereby obtaining valid data sent through the target channel.
[0173] The calculation module 843 may also determine the target channel by the channel of the data segment corresponding to the signal processing link with the CCA identifier 1. The calculation module 843 may also be used to calculate and obtain the digital average power of the target channel according to the data segment corresponding to the target channel. The digital average power value may be used to adjust the gain (such as AGC gain, or AGC Gain) during the amplification process performed by the RF module 802.
[0174] As an example, the calculation module 843 may obtain the digital average power of a certain channel according to the following formula (1).
[0175] Formula (1):
[0176] Among them, Digital_power average That is, the digital average power. N is the number of IQ data pairs required to calculate the digital average power. This N can be determined according to the data segment corresponding to the target channel. The AD conversion unit 803 needs to be added to the calculation process together with its symbol.
[0177] In the present application, the calculation module 843 can also be used to calculate and obtain the RSSI and other parameters corresponding to the antenna module 801 receiving the antenna signal of the target channel according to the data segment of the target channel and the AGC gain of the RF module 802 after the digital average power adjustment. The RSSI obtained by the calculation can be used to judge the current communication quality, display it separately, select the target data segment from multiple successfully matched data segments, and then determine the target channel, etc.
[0178] The technical solutions provided in the embodiments of this application can be applied to Figure 7 or Figure 8 In the electronic device shown.
[0179] For example, it can be further clarified Figure 8 The working mechanism of the electronic device composed of the above-mentioned components when performing multi-channel scanning is as follows. Figure 8 Taking the composition of the electronic device shown as an example, the specific implementation of multi-channel scanning by the electronic device is illustrated.
[0180] refer to Fig. 9 , taking n equal to 5 as an example. The channel division module of the electronic device may include DDC1 to DDC5, and LPF1 to LPF5 correspond to DDC1 to DDC5 respectively. Each LFP can be coupled to a CCA. For example, LPF1 is coupled to CCA1, LPF2 is coupled to CCA2, LPF3 is coupled to CCA3, LPF4 is coupled to CCA4, and LPF5 is coupled to CCA5. Thus, the matching process of each data segment is realized through CCA to determine whether there is a target channel.
[0181] Among them, DDC1 and LPF1 can form a signal division link for implementing the screening of a channel data segment. DDC1, LPF1 and CCA1 can form a signal processing link for implementing the screening and matching of a channel data from sampled data.
[0182] Similarly, DDC2, LPF2 and CCA2 can constitute a signal processing link, DDC3, LPF3 and CCA3 can constitute a signal processing link, DDC4, LPF4 and CCA4 can constitute a signal processing link, and DDC5, LPF5 and CCA5 can constitute a signal processing link.
[0183] The Fig. 9 The electronic device composition shown can support multi-channel scanning of up to 5 channels.
[0184] The following example takes the case where the electronic device determines to perform multi-channel scanning of 5 channels. Fig. 9 All DDCs, LPFs and CCAs shown can be powered on and operated under the control of the control module.
[0185] In some implementations, such as Fig.10 As shown, each scan can collect 40MHz of sampling data. Fig. 9 In the example, the sampled data acquired in one sampling may correspond to the multi-channel antenna signal 901.
[0186] Exemplarily, the electronic device may obtain the sampling data SD_A1 including most of the signals from channel 1 to channel 5 through the first scan. The electronic device may obtain the sampling data SD_A2 including most of the signals from channel 5 to channel 9 through the second scan. The electronic device may obtain the sampling data SD_A3 including most of the signals from channel 9 to channel 13 through the third scan.
[0187] It is understandable that since the 1 MHz at the head of channel 1 and the 1 MHz at the tail of channel 5 generally do not include valid data, in this example, the sampled data SD_A1 can cover 2402 MHz to 2442 MHz for subsequent processing to obtain data segments from channel 1 to channel 5. The subsequent steps are similar and will not be repeated.
[0188] Therefore, the scanning and analysis of the 2.4GHz frequency band can be covered by three scans, which can save the time and power consumption of up to 10 scans and analysis compared to single-channel scanning.
[0189] It is to be understood that, in the present application, the use of 40 MHz as the bandwidth for each scan during the simultaneous scanning of 5 channels is only an example, and in other implementations, the scanning bandwidth for each scan may also be different from 40 MHz.
[0190] For each scanned acquired sampling data (such as sampling data SD_A1, sampling data SD_A2, and sampling data SD_A3), the electronic device can be based on Fig. 9 The logic shown performs processing to determine whether there is a target channel among the five channels included in the sampled data.
[0191] like Fig. 9 As shown, the antenna module 801 can send the multi-channel antenna signal 901 to the RF module 802. The RF module 802 can perform RF domain processing such as analog down-conversion processing and amplification processing on the multi-channel antenna signal 901, thereby obtaining the multi-channel RF modulated signal 902.
[0192] refer to Fig.11 , an example is given to illustrate the analog down-conversion processing.
[0193] Take the current sampling data as Fig.10 The sample data SD_A1 shown is taken as an example.
[0194] Before analog down-conversion, the center frequency of the sampled data SD_A1 may be 2422 MHz, and the two end frequencies of the sampled data SD_A1 may be 2402 MHz and 2442 MHz respectively. After analog down-conversion, the center frequency of the sampled data SD_A1 may be 0 MHz, and the two end frequencies of the sampled data SD_A1 may be -20 MHz and 20 MHz respectively.
[0195] In other implementations, the Fig.11 The down-conversion process shown may also be performed in the AD conversion unit 803 .
[0196] After the down-conversion process, each DDC and LPF can perform corresponding processing to obtain the data segment of each channel.
[0197] In this way, the sampled data after the analog down-conversion processing can also be used to obtain a multi-channel RF modulated signal 902 based on operations such as amplification processing.
[0198] The multi-channel RF modulated signal 902 may be transmitted to the AD conversion unit 803 for analog-to-digital conversion to obtain a corresponding multi-channel digital signal 903. It is understandable that due to the aforementioned analog down-conversion process, the center frequency of the multi-channel digital signal 903 is 0 MHz.
[0199] The multi-channel digital signal 903 may be transmitted to the signal division module 841 for frequency shift processing.
[0200] In this example, DDC1 to DDC5 may be configured with different frequency shift capabilities, respectively.
[0201] For example, DDC1 can be used to perform a frequency shift of 0 MHz. DDC2 can be used to perform a frequency shift of -2.5 MHz and / or -5 MHz. DDC3 can be used to perform a frequency shift of 2.5 MHz and / or 5 MHz. DDC4 can be used to perform a frequency shift of -7.5 MHz and / or -10 MHz. DDC5 can be used to perform a frequency shift of 7.5 MHz and / or 10 MHz.
[0202] Furthermore, the pass frequency band of each filter in LPF1 to LPF5 may be the same.
[0203] For example, the passband of each filter is a frequency band with a center frequency of 0 MHz and a bandwidth of 22 MHz.
[0204] In this way, through the coordination of DDC1 to DDC5 and LPF1 to LPF5, the data segments corresponding to each channel can be obtained according to the sampled data.
[0205] Exemplary, reference Fig.12 .
[0206] like Fig.12 As shown in 1201, DDC1 can perform a frequency shift of 0 MHz on the sampled data SD_A1 processed in the RF domain. That is, the data distribution of the sampled data SD_A1 processed by DDC1 is the same as the distribution of the data processed in the RF domain in the frequency domain. In this way, the data segment within the range of + / -11 MHz of the center frequency (and 0 MHz) of the sampled data SD_A1 corresponds to channel 3.
[0207] Therefore, after the sampled data SD_A1 is filtered by LPF1, the retained data of 22 MHz bandwidth corresponds to the data segment corresponding to channel 3 (such as data segment 3).
[0208] Fig.12 1202 in the figure shows a logic example in the case of frequency shift processing other than 0 MHz.
[0209] In the example of 1202, the example of obtaining data segment 5 corresponding to channel 5 according to the sampled data SD_A1 processed in the radio frequency domain is used for explanation. The obtaining methods of other channels can be referred to and will not be described in detail.
[0210] As shown in 1202, the sampled data SD_A1 processed in the RF domain can be processed by -10MHz frequency shift through DDC4, so that the center frequency point of the data segment corresponding to channel 5 in the frequency domain is moved to 0MHz. In this way, after the sampled data SD_A1 is filtered by LPF4, the retained 22MHz bandwidth data also corresponds to the data segment corresponding to channel 5 (such as data segment 5).
[0211] Similarly, through the 0MHz frequency shift of DDC1 and the 22MHz filtering of LPF1, the data segment 3 corresponding to channel 3 can be obtained. Through the -5MHz frequency shift of DDC2 and the 22MHz filtering of LPF2, the data segment 4 corresponding to channel 4 can be obtained. Through the 5MHz frequency shift of DDC3 and the 22MHz filtering of LPF3, the data segment 2 corresponding to channel 2 can be obtained. Through the -10MHz frequency shift of DDC4 and the 22MHz filtering of LPF4, the data segment 5 corresponding to channel 5 can be obtained. Through the 10MHz frequency shift of DDC5 and the 22MHz filtering of LPF5, the data segment 1 corresponding to channel 1 can be obtained.
[0212] Continue to combine Fig. 9 , the data segment 3, data segment 4, data segment 2, data segment 5 and data segment 1 can be transmitted to the corresponding CCA for carrier sensing respectively, so as to determine whether there is a data segment using the target protocol type in these data segments through matching processing.
[0213] Combination Fig.131301 and 1302 briefly describe the mechanism of matching processing of CCA.
[0214] In the present application, the electronic device may perform a matching process on each of the acquired data segments. The matching process may be performed based on a preset Baker code corresponding to the target protocol type (such as a reference Baker code). Based on the matching process, the electronic device may determine the data segment using the target protocol from the currently acquired data segments (such as data segments 1 to 5).
[0215] Exemplarily, when the target protocol type is 802.11b protocol, the reference Baker code may be a Baker code corresponding to the preamble and frame header indicated by the 802.11b protocol. As an example, the reference Baker code may be an 11-bit Baker code corresponding to the 802.11b protocol.
[0216] In some embodiments, the matching process may be performed based on correlation peak detection.
[0217] Taking the case of performing correlation peak detection on data segment 1 corresponding to channel 1 to determine whether data segment 1 is a target data segment using a target protocol type, the electronic device can determine the number of valid correlation peaks corresponding to data segment 1 based on the reference Baker code and data segment 1. The valid correlation peak can be a correlation peak whose peak value is greater than a preset peak threshold.
[0218] As an example, take data segment 1 including 10 bits of digital information as an example. The listening unit can determine the number of valid correlation peaks corresponding to data segment 1 according to a preset detection window length and a sliding step size. The length of the detection window can be determined according to parameters such as the total length of data segment 1, the length of the reference Baker code, and the sampling multiple when data is collected.
[0219] Take the preset detection window length of 4 bits and the sliding step length of 1 bit as an example.
[0220] like Fig.13 As shown in 1301, the listening unit (such as CCA5) can generate a correlation peak 1 corresponding to the data in the current detection window (such as detection window 1) according to the first 4 bits of data segment 1 and the reference Baker code. In the case where the peak value of the correlation peak 1 is greater than the peak value threshold, the correlation peak 1 is confirmed to be a valid correlation peak. Then, correspondingly, the counter for recording the number of valid correlation peaks set in the listening unit is increased by 1.
[0221] Then, the detection window can slide backward according to the sliding step size. Fig.13As shown in 1302, the data in the detection window 2 may include the 2nd to 5th digital information in the data segment 1. Correspondingly, the listening unit can generate the correlation peak 2 corresponding to the data in the current detection window (such as detection window 2) according to the data in the detection window 2 and the reference Baker code. In the case where the peak value of the correlation peak 2 is less than the peak value threshold, it is confirmed that the correlation peak 2 is not a valid correlation peak. Then, correspondingly, the counter for recording the number of valid correlation peaks set in the listening unit is not recorded.
[0222] This process continues in this way until the detection window slides to the last bit of data segment 1.
[0223] The matching module 842 can determine whether the correlation peaks of the data in each detection window are valid correlation peaks, and then record the number of valid correlation peaks in the counter.
[0224] In some embodiments, after completing the data detection in all data segments 1, the matching module 842 can compare the value in the counter with the preset quantity threshold. When the value (i.e., the number of valid correlation peaks corresponding to the data segment 1) is greater than the preset quantity threshold, the data segment 1 is determined to be the target data segment. On the contrary, when the number of valid correlation peaks corresponding to the data segment 1 is less than the preset quantity threshold, the data segment 1 is determined not to be the target data segment.
[0225] In other embodiments, when the number of effective correlation peaks in data segment 1 is greater than a number threshold, the electronic device may determine that these correlation peaks appear continuously, and further determine that data segment 1 is a target data segment, thereby improving the accuracy of determining the target data segment.
[0226] Similarly, the matching module 842 can perform the following operations on other data segments (such as data segments 2 to 5). Fig.13 The matching process shown is performed to determine the target data segments included in data segments 2 to 5.
[0227] In this way, the matching module 842 can determine the channel corresponding to the target data segment in the sampled data SD_A1 as the target channel using the target protocol type. Correspondingly, the matching module 842 can configure the CCA flag corresponding to the target channel to be high level (or 1). Similarly, after completing the scanning and parsing of the sampled data SD_A1, the electronic device can also Fig.10 The sampled data SD_A2 and the sampled data SD_A3 shown are scanned and analyzed to determine the target channel among channels 1 to 13 in the current environment.
[0228] In some implementations, channel 1 to channel 13 may include one target channel (such as channel 1). After the scanning and analysis is completed, the CCA identifier of the signal processing link corresponding to channel 1 can be configured to a high level (or 1), and the CCA identifiers of the links of other channels remain at a low level (or 0).
[0229] In other implementations, the channel 1 to the channel 13 may include multiple channels using the target protocol type. The matching module 842 may use the channel using the target protocol type that receives the data earliest as the target channel according to the order in which the data from the multiple channels using the target protocol type are received, and configure the CCA flag corresponding to the channel to a high level (or 1).
[0230] In this way, through Figure 10 to Figure 13 The description is as follows Fig. 9 In the logical implementation shown, it is possible to identify the target channel using the target protocol type through the CCA identification mark when scanning multiple channels (such as 5 channels) at one time.
[0231] After that, the parsing module 844 can continue to receive data for subsequent communication according to the channel with the CCA flag configured as a high level (or 1), and then parse the data received on the target channel according to the target protocol type to obtain the valid data carried therein.
[0232] It should be noted that the above Figure 8 to Figure 9 And follow-up Figure 10 to Figure 13 The electronic device composition for implementing the multi-channel / single-channel scanning solution of the present application is only an example. In other embodiments, each component in the electronic device may also be partially or completely integrated into other components. The embodiments of the present application do not limit the specific implementation form of the functions of each component in the electronic device.
[0233] For ease of explanation, Fig.14 An example of a simplified logical connection between multiple modules of an electronic device is provided. Fig.14 The logical connections shown can be mapped to Figures 8 to 13 Description of each component in .
[0234] like Fig.14 As shown, the antenna module 801 in the electronic device can be coupled to the RF module 802. In order to facilitate the antenna module 801 to convert the received electromagnetic waves into antenna signals (such as Fig. 9 The multi-channel antenna signal 901 shown in FIG. 1 is transmitted to the RF module 802. The RF module 802 performs radio frequency domain processing including amplification processing, analog down-conversion processing, etc. on the multi-channel antenna signal 901 to obtain a multi-channel RF modulated signal 902.
[0235] The RF module 802 is coupled to the AD conversion unit 803 , so that the RF module 802 transmits the multi-channel RF modulated signal 902 to the AD conversion unit 803 for digital sampling to obtain the multi-channel digital signal 903 .
[0236] The AD conversion unit 803 is coupled to the signal division module 841 so that the signal division module 841 performs frequency shift filtering on the multi-channel digital signal 903 to obtain data segments of each channel included in the sampling data obtained by the current multi-channel scanning.
[0237] The signal division module 841 is coupled to the matching module 842. The matching module 842 performs carrier sensing on the data segments of each channel respectively, thereby determining whether one or more channels currently scanned are in the target channel. If so, the CCA flag of the corresponding link is configured as 1. On the contrary, if not, the CCA flags of all links remain 0. The electronic device continues to perform the next multi-channel / single-channel scan.
[0238] The matching module 842 is coupled to the calculation module 842 and the analysis module 844. The calculation module 842 and the analysis module 844 determine the target channel and the corresponding data segment according to the CCA identifier, so that the calculation module 842 and the analysis module 844 determine the target channel according to the CCA identifier and perform subsequent processing.
[0239] The calculation module 843 is also coupled to the AGC unit 845, so that the AGC unit 845 can obtain the digital average power of the target channel from the calculation module 843. The AGC unit 845 can flexibly adjust the AGC gain of the RF module 802 according to the digital average power.
[0240] The calculation module 843 also calculates and determines relevant parameters, such as RSSI, when receiving data transmitted by the target channel according to the AGC gain adjusted by the RF module 802 .
[0241] It should be pointed out that, in other embodiments, in order to achieve the above-mentioned compatible multi-channel and single-channel scanning, the electronic device may also have other components.
[0242] Exemplary, reference Fig.15 , which is the composition and connection logic of another electronic device provided in an embodiment of the present application.
[0243] Combination Fig.14 , in such Fig.15 In the example of , a DC removal module 805 may also be included. In different implementations, the DC removal module 805 may be used to remove the DC of analog signals, or to remove the DC of digital signals.
[0244] It is understandable that the DC signal will increase the power of the entire signal, which may cause the power of the part of the signal carrying valid data to be too high, resulting in inaccurate processing. In addition, the larger the DC signal, the greater the interference that may be generated. Therefore, in this example, the DC signal is filtered out by configuring the DC removal module 805.
[0245] In such Fig.15 In the example of , the DC removal module 805 can be configured between the AD conversion unit 803 and the signal division module 841 to perform DC filtering of the digital signal. In other embodiments, the DC removal module 805 can also be configured between the signal division module 841 and the matching module 842. In other embodiments, the DC removal module 805 can also be configured between the matching module 842 and the analysis module 844. In other embodiments, the DC removal module 805 can also be configured before the AD conversion unit 803 to perform DC filtering of the analog signal. For example, the DC removal module 805 is configured in the RF module 802. For another example, the DC removal module 805 is configured between the RF module 802 and the AD conversion unit 803.
[0246] In other embodiments, the DC removal module 805 may also be configured at two or more logical positions in the above embodiments to achieve multiple DC filtering.
[0247] refer to Fig.14 , in such Fig.15 In the example, a digital resampling module 806 may also be included.
[0248] It is understandable that in order to ensure the accuracy of the digital processing process, the digital sampling frequency of each module that processes the digital signal (such as the matching module 842, the analysis module 844, the calculation module 843, etc.) needs to match the AD conversion unit 803. For example, when the sampling frequency of the AD conversion unit 803 is 80MHz, the sampling frequency of each module that processes the digital signal can also be 80MHz. In some cases, the sampling frequency of the AD conversion unit 803 is different from the sampling frequency of each module that processes the digital signal. In this way, by configuring Fig.15 The digital resampling module 806 shown achieves the unification of sampling frequency, thereby ensuring the accuracy of digital processing.
[0249] For example, the sampling frequency of the AD conversion unit 803 is 80 MHz, and the sampling frequency of each module for processing digital signals is 44 MHz. Then, a digital resampling module 806 can be configured between the signal division module 841 and the matching module 842. The digital resampling module 806 can provide digital resampling processing from 80 MHz to 44 MHz.
[0250] In some other embodiments of the present application, the electronic device may also be configured with relevant modules for amplifying digital signals.
[0251] Exemplary, reference Fig.16 A digital gain control module 807 may also be configured in the electronic device.
[0252] In some embodiments, the digital gain control module 807 can be configured in the baseband module 840 of the electronic device. For example, the digital gain control module 807 can be configured between the matching module 842 and the parsing module 844. In this way, when the matching module 842 determines the target channel and configures the corresponding CCA identifier to 1, the digital gain control module 807 can identify the target data segment according to the CCA identifier configured to 1, and the target data segment can be a digital signal corresponding to the target channel. The digital gain control module 807 can also amplify the target data segment. For example, the digital gain control module 807 can enlarge the bit width of the target data segment from 4 bits to 7 bits.
[0253] In this way, the target data segment can be effectively amplified in a targeted manner, thereby facilitating accurate analysis by the subsequent analysis module 844.
[0254] It can be understood that, in combination with the description of the matching mechanism of the aforementioned matching module 842, in the present application, the carrier sensing performed by the matching module 842 can be used to match the frame header of the currently received data segment with the baker code of the target protocol type, thereby determining the target channel and / or target data segment. Generally, in the frame structure of Bluetooth beacons or similar devices used in scenarios such as indoor positioning, indoor precise navigation, and device proximity discovery, the data load will use a higher-order modulation method than the frame header. In other words, when the matching module 842 is able to determine the target channel based on the frame header through carrier sensing, it is also possible that the subsequent data load received on the target channel is insufficient in bit width of the valid data due to the higher-order modulation method, and the parsing module 844 cannot parse it normally.
[0255] Thus, through Fig.16 The configuration of the digital gain control module 807 enables the parsing module 844 to amplify the data load of the target channel before parsing the data load of the target channel. Therefore, when the above situation occurs, the parsing module 844 can also effectively and accurately parse the amplified data load.
[0256] It should be noted that, in combination with the foregoing description of the solution provided in the embodiment of the present application, after the multi-channel signal / single-channel signal is received by the antenna, the analysis and processing after the target channel is determined. In this complete process, the data can be analog-amplified in the RF module 802. The data can also be digitally amplified before being parsed. In a specific implementation, the analog amplification and digital amplification can be selectively configured for use. For example, in some embodiments, only the analog amplification-related components in the RF module 802 can be configured. In other embodiments, only the digital gain control module 807 can be configured so that the digital signal is amplified. In other embodiments, the analog amplification-related components in the RF module 802 and the digital gain control module 807 can also be configured at the same time, so that the data can be analog-amplified and digitally amplified at the same time.
[0257] The multi-channel / single-channel scanning solutions provided in the embodiments of the present application can be applied to Figure 7 , Figure 8 , Fig. 9 , Fig.14 , Fig.15 as well as Fig.16 provided in electronic equipment.
[0258] In combination with the foregoing description of the control module 805, in some implementations of the embodiments of the present application, the control module 805 can flexibly control the signal division module 841 in the baseband module 840 and the power-on operation of related components in the matching module 842 according to current needs, thereby providing different numbers of digital signal processing capabilities in multi-channel scanning / single-channel scanning.
[0259] Exemplary, reference Fig.17 , the electronic device may also be configured with a scanning decision unit.
[0260] The scanning decision unit can be used to determine the current demand according to the pre-configured processing mechanism, and then determine whether to perform multi-channel scanning or single-channel scanning in the current scenario. Furthermore, if multi-channel scanning is performed, the scanning decision unit can also determine the number of channels used for the multi-channel scanning. If single-channel scanning is performed, the scanning decision unit can also determine which channels are used for single-channel scanning. In the following description, the configurations of performing multi-channel scanning or single-channel scanning and / or the specific number of channels / channel selection determined by the scanning decision unit are collectively referred to as scanning configurations.
[0261] Combination Figure 8 ,like Fig.17 As shown, in different implementations, the scanning decision unit may be configured in different components of the electronic device.
[0262] In some embodiments, the scanning decision unit may be configured in the baseband module 840 (eg, Fig.17 1 . The scanning decision unit 1801a shown in FIG. 1 is a scanning decision unit 1801a. In this example, from a software perspective, the scanning decision unit 1801a can be configured in the kernel layer of the electronic device. Thus, after the scanning decision unit 1801a determines the scanning configuration, it can enable the components on the corresponding signal processing link through the control module 805, so that the baseband module 840 provides the digital processing capability corresponding to the scanning configuration.
[0263] In some other embodiments, the scanning decision unit may also be configured in the control module 805 (eg Fig.17 1801b). In this example, from the perspective of software, the scanning decision unit 1801b can be configured in the application layer or framework layer of the electronic device. Thus, after the scanning decision unit 1801a determines the scanning configuration, it can enable the components on the corresponding signal processing link configured in the baseband module 840, so that the baseband module 840 provides the digital processing capability corresponding to the scanning configuration.
[0264] The embodiment of the present application does not limit the specific configuration implementation of the scanning decision unit.
[0265] The following is an example of the scanning configuration determination scheme provided in the embodiment of the present application in conjunction with the accompanying drawings. Fig. 9 For the sake of convenience, DDC1, LPF1 and CCA1 can constitute signal processing link 1, DDC2, LPF2 and CCA2 can constitute signal processing link 2, DDC3, LPF3 and CCA3 can constitute signal processing link 3, DDC4, LPF4 and CCA4 can constitute signal processing link 4, and DDC5, LPF5 and CCA5 can constitute signal processing link 5.
[0266] In some embodiments, the scanning decision unit may be based on Fig.18 Decision plan A shown, determines the scanning configuration.
[0267] like Fig.18 As shown, in some implementations, decision scheme A may include the specific implementation shown in 181.
[0268] Exemplarily, the scanning decision unit may determine the scanning configuration according to relevant information of a cell to which the electronic device currently accesses the cellular network.
[0269] The relevant information of the cell of the cellular network may include a cell ID and the like.
[0270] In this example, a corresponding relationship 1801 may be configured in the electronic device. The corresponding relationship 1801 may include a corresponding relationship between at least one cell identifier and a scanning configuration. Based on the corresponding relationship 1801 and the cell identifier of the current cellular network, the scanning decision unit may determine the scanning configuration that needs to be used currently.
[0271] As an example, the following Table 1 shows an example of a corresponding relationship 1801.
[0272] Table 1
[0273] Cell ID Scan Configuration Logo A1 1 / 6 / 11 single channel scanning Logo A2 5-channel multi-channel scanning …… ……
[0274] Combined with the example in Table 1, take the cell identifier of the cellular network currently accessed by the electronic device as identifier A1. Then, according to the corresponding relationship 1801, the scanning decision unit can determine that the current corresponding single-channel scanning is to be performed. According to the corresponding relationship 1801, the scanning decision unit can also determine that it is not necessary to perform single-channel scanning on all channels in sequence, but only needs to perform single-channel scanning on channel 1, channel 6, and channel 11 respectively. Further, the scanning decision unit can enable the following Fig. 9 One of the signal processing chains shown (such as the signal processing chain corresponding to DDC1-LPF1-CCA1) is powered on to provide digital processing capability for single-channel data.
[0275] For example, the cell identifier of the cellular network currently accessed by the electronic device is identifier A2. Then, according to the corresponding relationship 1801, the scanning decision unit can determine that the current corresponding multi-channel scanning is performed, and the number of channels scanned simultaneously during the multi-channel scanning process is 5. Further, the scanning decision unit can enable the following Fig. 9 All DDCs, LPFs, and CCAs shown are powered on to provide digital processing capability for 5 channels of data.
[0276] like Fig.18 As shown, in some other implementations, decision scheme A may include the specific implementation shown in 182.
[0277] Exemplarily, the scanning decision unit may determine the number of wireless access points (APs) at the current location based on the relevant information of the cell where the current electronic device accesses the cellular network. The AP may have the ability to create a Wi-Fi network. As an example, the AP may correspond to each device that creates a Wi-Fi network in the environment where the electronic device is currently located in the aforementioned example. For example, in Figure 1 In the scenario example, the AP may include device 11, device 12, and device 13.
[0278] As an example, the electronic device may determine the number of APs according to the preconfigured correspondence 1802 and based on relevant information (such as a cell ID) of a cell to which the electronic device currently accesses a cellular network.
[0279] In this example, the correspondence 1802 may include a correspondence between at least one cell identifier and the number of APs. Based on the correspondence 1802 and the number of APs at the current location, the scanning decision unit can determine the scanning configuration that needs to be used currently. It can be understood that, in general, the number of APs set near a fixed location does not change frequently. Therefore, the content in the correspondence 1802 can be pre-configured in the electronic device, enabling the electronic device (such as the scanning decision unit in the electronic device) to accurately determine the number of APs at the current location based on the cell identifier that identifies the current location according to the correspondence 1802 without scanning.
[0280] As an example, the following Table 2 shows an example of a corresponding relationship 1802.
[0281] Table 2
[0282] Cell ID Number of APs Logo B1 Quantity 1 Logo B2 Quantity 2 …… ……
[0283] In conjunction with the example in Table 1, taking the cell identifier of the cellular network currently accessed by the electronic device as identifier B1 as an example, then, according to the corresponding relationship 1802, the scanning decision unit can determine that the number of APs at the current location is 1.
[0284] For example, the cell identifier of the cellular network currently accessed by the electronic device is identifier B2. Then, according to the corresponding relationship 1802, the scanning decision unit can determine that the number of APs at the current location is 2.
[0285] In this Fig.18 In the example of 182, the scanning decision unit may also determine the scanning configuration that needs to be currently used according to the determined number of APs.
[0286] Exemplarily, an AP number threshold may be configured in the electronic device. The scanning decision unit may determine to perform single-channel scanning when the number of APs at the current location is greater than the AP number threshold. Alternatively, the scanning decision unit may determine to perform multi-channel scanning when the number of APs at the current location is less than the AP number threshold.
[0287] In conjunction with the example in Table 2, the cell identifier of the cellular network currently accessed by the electronic device is taken as identifier B1 for example.
[0288] According to the corresponding relationship 1802 in Table 2, the scanning decision unit can determine that the number of APs at the current location is 1. When the number 1 is greater than the AP number threshold, it means that the network environment under the current environment is relatively complex, so the scanning decision unit can determine to use single-channel scanning as the current scanning configuration, thereby scanning the distribution of each channel one by one.
[0289] Take the cell identifier of the cellular network currently accessed by the electronic device as identifier B2 as an example.
[0290] According to the corresponding relationship 1802 in Table 2, the scanning decision unit can determine that the number of APs at the current location is 2. When the number 2 is less than the AP number threshold, it means that the network environment in the current environment is relatively simple, so the scanning decision unit can determine to use multi-channel scanning as the current scanning configuration, thereby using a small number of scanning times to scan each channel in the current environment.
[0291] It should be noted that in the above implementation, single-channel scanning is performed when the number of APs is greater than the AP number threshold, and multi-channel scanning is performed when the number of APs is less than the AP number threshold. In other embodiments, the judgment mechanism can be configured as follows: multi-channel scanning is performed when the number of APs is greater than the AP number threshold, and single-channel scanning is performed when the number of APs is less than the AP number threshold. It can be understood that different judgment mechanisms have different effects and can adapt to the needs of different scenarios. The electronic device can flexibly determine / configure the above-mentioned different judgment mechanisms according to actual conditions, and then obtain a scanning configuration that is adapted to the current scenario.
[0292] Thus, by Fig.18 In the decision scheme A shown, the scanning decision unit can determine the currently required scanning configuration, and then control the corresponding signal processing link in the electronic device to power on and implement single-channel scanning or multi-channel scanning.
[0293] Furthermore, according to the scanning results, the electronic device can provide indoor positioning, indoor precise navigation, device proximity detection and other services based on the data transmitted on the target channel and / or related parameters of the data (such as RSSI, etc.).
[0294] In other embodiments of the present application, reference Fig.19 , is a logic diagram of a scanning control method provided in an embodiment of the present application. Fig.19 The solution provided can also be called decision solution B. Fig.19 The solution shown is implemented so that the scanning decision unit can also determine the scanning configuration, and then enable the electronic device to provide corresponding services according to the scanning result corresponding to the scanning configuration.
[0295] For example, Fig.19As shown, the program may include:
[0296] S1901. The scanning decision unit performs channel scanning of a preset channel.
[0297] Exemplarily, in some embodiments, the channel scan of the preset channel may be a single channel scan of the preset channel.
[0298] The preset channel may be pre-configured in the electronic device. For example, the preset channel may include 1 / 6 / 11. For another example, the preset channel may include 1 / 5 / 9 / 13.
[0299] In some other embodiments of the present application, the scanning of the preset channel may also be a multi-channel scanning of the preset channel. The number of channels used in the multi-channel scanning process may be pre-configured.
[0300] It can be understood that the preset channel can be a channel frequently used by the electronic device in providing channel scanning related services (such as indoor positioning, indoor precise navigation, device proximity discovery and other services).
[0301] The configuration of the preset channel can be achieved through various ways.
[0302] For example, the preset channel may be configured in the electronic device when the electronic device leaves the factory.
[0303] As another example, the preset channel may be determined by the scanning decision module of the electronic device based on the stored historical data before the current scanning configuration is determined. In some implementations, the historical data may include the channel information (such as the channel number) used by the current electronic device in providing channel scanning related services before the current moment. In other implementations, the historical data may include the channel information used in providing channel scanning related services obtained by the electronic device from the cloud server and collected by other electronic devices that are the same or related to the current electronic device model and in the current area.
[0304] In this way, by scanning the preset channels, the scanning decision unit can filter and obtain the target channel from the preset channels. Alternatively, the preset channels may not include the target channel. The target channel may be a channel using the target protocol type.
[0305] In this example, the electronic device may execute S1902 to S1904 when there is a target channel in the preset channels.
[0306] Correspondingly, the electronic device may execute S1905 when there is no target channel in the preset channels.
[0307] S1902: The scanning decision unit obtains hardware parameters of the AP corresponding to the target channel.
[0308] Through the processing of S1901, the scanning decision unit has screened and acquired the target channel from the preset channels.
[0309] In this example, the scanning decision unit can obtain the hardware parameters of the AP that uses the target channel for data transmission. It can be understood that in the same scenario, the number of APs using the target channel can be one or more. In this way, when the number of APs using the target channel is multiple, the scanning decision unit can obtain the hardware parameters of each AP respectively.
[0310] In the present application, the hardware parameters of the AP may include at least one of the following: Media Access Control Address (MAC) address, Service Set Identifier (SSID), Basic Service Set Identifier (BSSID), Extended Service Set Identifier (ESSID), etc.
[0311] It is understandable that the hardware parameters of the AP can be used to mark a fixed AP. The location of the fixed AP does not change frequently, so the scanning decision unit can determine which APs are included near the current location of the electronic device based on the hardware parameters of the AP.
[0312] Based on this, electronic devices can achieve relatively rough positioning.
[0313] Exemplarily, a correspondence 1803 may be configured in the electronic device, and the correspondence 1803 may be configured with a correspondence between hardware parameters of at least one AP and location information.
[0314] In this way, the electronic device can determine the current location based on the hardware parameters of at least one AP near the current location acquired by the scanning decision unit and the corresponding relationship 1803.
[0315] For example, the hardware parameters of the AP corresponding to the target channel near the current position acquired by the scanning decision unit include hardware parameter 1, hardware parameter 2 and hardware parameter 3, which correspond to AP1, AP2 and AP3 respectively.
[0316] According to the corresponding relationship 1803, the electronic device can determine the position information 1 corresponding to the hardware parameter 1, the position information 2 corresponding to the hardware parameter 2, and the position information 3 corresponding to the hardware parameter 3. Further, the electronic device can identify the center of the triangle formed by the position information 1, the position information 2 and the position information 3 as the current position of the electronic device.
[0317] For another example, the hardware parameters of the AP corresponding to the target channel near the current position acquired by the scanning decision unit include hardware parameter 4. In this way, the electronic device can determine that the current position is the position information 4 corresponding to the hardware parameter 4 according to the corresponding relationship 1803.
[0318] It should be noted that the configuration of the corresponding relationship 1801, the corresponding relationship 1802 and the corresponding relationship 1803 involved in the embodiment of the present application is similar to the configuration of the preset channel described above, and can be configured at the factory or configured according to historical data. The historical data can be collected by the current electronic device itself or obtained from the cloud.
[0319] In this way, the positioning function can be realized through the hardware parameters obtained by S1902.
[0320] In some scenarios, the electronic device may need to provide a more sophisticated positioning function, or functions that require higher precision, such as indoor navigation and device proximity detection. In this way, the electronic device may continue to execute the following S1904.
[0321] S1903: The scanning decision unit determines to continue scanning according to current service requirements.
[0322] The service demand may be a demand for services currently required by the electronic device, and the services currently required may include the above-mentioned scanning-related services.
[0323] In this example, when the electronic device determines that the currently provided service is a service in the preset high-precision service list, it may determine to continue scanning so as to obtain more information for providing a more accurate service.
[0324] Exemplarily, the high-precision service list may include: high-precision indoor positioning, indoor navigation, device proximity discovery and other services.
[0325] S1904: The scanning decision unit determines a scanning configuration according to hardware parameters, and controls the electronic device to scan according to the scanning configuration.
[0326] Exemplarily, in some embodiments, the scanning decision unit may determine the scanning configuration according to the number of APs indicated by the hardware parameters.
[0327] Combination Fig.18 In the description of 182, in this example, the scanning decision unit can determine the scanning configuration according to the relationship between the number of current APs and the AP number threshold. For specific implementation, please refer to the description of 182, which will not be repeated here.
[0328] In this way, after determining the scanning configuration, the electronic device can perform a comprehensive scan of the channels in the current environment according to the scanning configuration. After obtaining the scanning results of each channel, the electronic device can provide channel scanning related services with higher accuracy.
[0329] For example, the electronic device can accurately calculate the current location of the electronic device based on the RSSI of data transmitted on each target channel determined by the comprehensive scan and the location of each AP.
[0330] S1905: Perform a single-channel scan or a preset number of multi-channel scans on all channels.
[0331] In combination with the description of S1901, after scanning the preset channels, if it is determined that the preset channels do not include the target channel, the electronic device may execute S1905.
[0332] In S1905, the scanning decision unit may determine the current scanning configuration as: performing a comprehensive scan on all channels. Exemplarily, through the comprehensive scan, the scanning decision unit may obtain the number of APs corresponding to all target channels in the current environment and / or the hardware parameters of the APs using the target channels.
[0333] As a possible implementation, after determining the target channel through single-channel or multi-channel scanning, the electronic device can communicate with the AP using the target channel to obtain the hardware parameters of the corresponding AP. In addition, the electronic device can also record the number of APs using the target channel.
[0334] It should be noted that in this example, whether single-channel scanning or multi-channel scanning is used in the specific scanning process, and the number of channels used in the multi-channel scanning process, can be pre-configured in the electronic device, or can be flexibly determined by the electronic device based on actual conditions such as the current load.
[0335] In this way, by scanning all channels, the electronic device can determine the specific AP distribution in the current location.
[0336] It can be understood that, generally speaking, when the current location of the electronic device is included in the historical track, since the preset channel can be obtained based on historical data, S1902 and related processing will be triggered.
[0337] Correspondingly, when the current position of the electronic device is not included in the historical track, that is, when the electronic device is in a new position, it is possible that the preset channels do not include the target channel. Then, through the processing of S1905, the electronic device can obtain the AP distribution of the current new position.
[0338] For example, Fig.19As shown, after obtaining comprehensive scanning results (such as the number of APs corresponding to all target channels in the current environment and / or hardware parameters of APs using the target channels), the electronic device can accurately locate the current position based on the scanning results.
[0339] In other implementations, the electronic device may also update the location information of the current location, and the corresponding relationship between the number of APs in the current environment, the hardware parameters of the APs, etc., to the historical information. For example, the electronic device may execute S1906 to add the environmental information of the current location to the historical data according to the scanning result. The environmental information may include the location information of the current location, the number of APs, the hardware parameters of the APs, etc.
[0340] In this way, the next time the scanning configuration needs to be determined, or the next time the electronic device arrives at the location, the electronic device can update the preset channel and / or the corresponding relationship 1803 according to the historical information. In this way, the current location can be positioned with high precision without the need to perform a comprehensive scan of all channels.
[0341] It is understandable that the above Fig.18 as well as Fig.19 At least two solutions for determining the scanning configuration are provided, which can be flexibly selected during the specific implementation process. Alternatively, in other embodiments, it is also possible to combine Fig.18 as well as Fig.19 The provided scheme implementation determines the scanning configuration in the current scene.
[0342] As a scenario example, combined with Fig. 20 and Fig.21 , an example is given of the actual effect that can be achieved by applying the solution provided in the embodiments of the present application.
[0343] For example, Fig. 20 An example of a scenario is provided. Fig. 20 As shown, the user holds an electronic device and approaches a cell XX. Near the current location, there may be APs such as AP1, AP2, and AP3 that create a Wi-Fi network.
[0344] like Fig.21 As shown, the electronic device can be used according to Fig.18 or Fig.19 The provided solution determines the scanning configuration in the current environment and performs single-channel scanning or multi-channel scanning according to the scanning configuration.
[0345] Combination Fig.18 or Fig.19 According to the description in, based on the scanning result, the electronic device can determine the target channel in the environment near the current location. In this example, the electronic device can also determine that the APs using the target channel include AP1.
[0346] In this way, the electronic device can receive the data from AP1 on the target channel and provide corresponding services.
[0347] For example, take AP1 as an example of a smart cabinet in XX community that can provide express storage services.
[0348] The electronic device can receive data from the AP1 on the target channel and measure the corresponding RSSI. When the RSSI is greater than a preset RSSI threshold, the electronic device is triggered to provide a delivery reminder service.
[0349] Exemplarily, the electronic device may display card 2101 on the top of the interface. The card 2101 may include the pick-up address as "XX Community Smart Cabinet", the number of items to be picked up as "2", and other express-related information.
[0350] It is understandable that, due to the implementation of the multi-channel scanning solution provided by the present application, it is possible to quickly locate itself to accurately and quickly trigger related service functions (such as Fig.21 In addition, combined with the express delivery reminder service shown in Fig.18 and Fig.19 The implementation of the provided scanning configuration enables the electronic device to locate itself more accurately and efficiently after performing single-channel or multi-channel scanning using the corresponding scanning configuration.
[0351] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of each functional module. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0352] The above integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0353] For example, Fig. 22 FIG. 2 shows a schematic diagram of the composition of an electronic device 2200. Fig. 22As shown, the electronic device 2200 may include: a processor 2201 and a memory 2202. The memory 2202 is used to store computer-executable instructions. Exemplarily, in some embodiments, when the processor 2201 executes the instructions stored in the memory 2202, the electronic device 2200 may execute any of the methods shown in the above embodiments. Fig. 22 As shown, in this example, the electronic device may also be configured with an antenna 2203 for receiving and sending signals. Thus, the processor 2201 may process the signal received by the antenna 2203 according to the instructions stored in the memory 2202, or send the processed signal through the antenna 2203.
[0354] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0355] Fig.23 A schematic diagram of the composition of a chip system 2300 is shown. The chip system 2300 may include: a processor 2301 and a communication interface 2302, which are used to support related devices or components to implement the functions involved in the above embodiments. In a possible design, the chip system also includes a memory for storing necessary program instructions and data for electronic devices. The chip system may be composed of chips, or may include chips and other discrete devices. It should be noted that in some implementations of the present application, the communication interface 2302 may also be referred to as an interface circuit. Exemplarily, the chip system 2300 may include a baseband chip. The baseband chip can be used to implement the various functions of the baseband module 840 provided in various embodiments of the present application.
[0356] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0357] The functions or actions or operations or steps in the above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may include one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0358] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A scanning control method, characterized in that: The method is applied to an electronic device, the electronic device having a channel scanning capability, the channel scanning capability being used to determine a target channel in a current environment, the target channel being a channel that uses a target protocol type for data transmission; The electronic device provides the channel scanning capability by performing single channel scanning or multi-channel scanning; The method comprises: The electronic device determines a scanning configuration according to a first parameter; wherein the first parameter corresponds to a current location of the electronic device; The scanning configuration includes any one of the following: a single-channel scanning configuration, a multi-channel scanning configuration; The electronic device performs the single channel scan according to the scan configuration, or, The electronic device performs the multi-channel scanning according to the scanning configuration; The single-channel scanning is used to determine whether the scanned channel is the target channel, and the multi-channel scanning is used to determine whether the scanned multiple channels include the target channel.
2. The method according to claim 1, characterized in that The electronic device is configured with a first antenna, and the first antenna is used to obtain first sampled data; The electronic device is also configured with N signal processing links; each of the signal processing links is used to process data of a channel to determine whether a channel corresponding to the processed data is the target channel; N is an integer greater than or equal to 2; The performing of the single channel scanning comprises: The electronic device acquires the first sampling data through the first antenna, where the first sampling data includes data of a first channel; The electronic device controls the first signal processing link included in the N signal processing links to power on and operate, The electronic device determines, through the first signal processing link, whether the first channel in the first sampled data is the target channel.
3. The method according to claim 1, characterized in that The electronic device is configured with a first antenna, and the first antenna is used to obtain second sampling data; The electronic device is configured with N signal processing links; N is an integer greater than or equal to 2; each of the signal processing links is used to process data of a channel to determine whether a channel corresponding to the processed data is the target channel; Different signal processing links included in the N signal processing links process data corresponding to different channels; The performing of the multi-channel scanning comprises: The electronic device acquires the second sampled data through the first antenna, and the frequency band corresponding to the second sampled data at least covers the second channel and the third channel; The electronic device controls M signal processing links included in the N signal processing links to power on and operate; M is an integer greater than or equal to 2 and less than or equal to N; The electronic device determines whether the second channel and / or the third channel in the second sampled data is the target channel through the M signal processing links.
4. The method according to claim 3, characterized in that For each of the N signal processing links, the signal processing link comprises: a frequency shift unit, a filter unit coupled to the frequency shift unit, and a carrier sense CCA unit coupled to the filter unit; The frequency shift unit is used to perform frequency shift processing; when the frequency shift units included in different signal processing links perform frequency shift processing, the corresponding frequency shift lengths are different; The filtering unit is used to perform filtering processing, and the passing bandwidth of the filtering units included in different signal processing links is the data bandwidth of 1 channel; The CCA unit is used to determine whether the data segment input to the CCA unit is transmitted via the target protocol type.
5. The method according to claim 4, characterized in that The electronic device performs the multi-channel scanning according to the scanning configuration; the M signal processing links include a second signal processing link; The electronic device controls M signal processing links included in the N signal processing links to power on and operate, including: The electronic device controls the second signal processing link to power on and operate; The electronic device determines, through the M signal processing links, whether the second channel and / or the third channel in the second sampled data is the target channel, including: The frequency shift unit in the second signal processing link performs a first frequency shift process on the second sampled data; in the second sampled data after the first frequency shift process, the center frequency of the data corresponding to the second channel is 0 MHz; The filtering unit in the second signal processing link performs filtering processing on the second sampling data after the first frequency shift processing to obtain a second data segment corresponding to the second channel; The CCA unit in the second signal processing link performs carrier sensing on the second data segment to determine whether the second channel is a target channel.
6. The method according to claim 4 or 5, characterized in that: The electronic device performs the multi-channel scanning according to the scanning configuration; the M signal processing links include a third signal processing link; The electronic device controls M signal processing links included in the N signal processing links to power on and operate, including: The electronic device controls the third signal processing link to power on and operate; The electronic device determines, through the M signal processing links, whether the second channel and / or the third channel in the second sampled data is the target channel, including: The frequency shift unit in the third signal processing link performs a second frequency shift process on the second sampled data; in the second sampled data after the second frequency shift process, the center frequency of the data corresponding to the third channel is 0 MHz; The filtering unit in the third signal processing link performs filtering processing on the second sampling data after the second frequency shift processing to obtain a third data segment corresponding to the third channel; The CCA unit in the third signal processing link performs carrier sensing on the third data segment to determine whether the third channel is a target channel.
7. The method according to any one of claims 4 to 6, characterized in that: The frequency shift unit includes a digital down-conversion DDC unit, and the filtering unit includes a low-pass filter LPF.
8. The method according to any one of claims 2 to 7, characterized in that: Before the sampled data is input into the N signal processing links, the method further includes: The electronic device performs down-conversion processing on the sampled data acquired by the first antenna, so that the center frequency point of the sampled data after the down-conversion processing is 0 MHz.
9. The method according to any one of claims 1 to 8, characterized in that The electronic device is also provided with a digital gain control unit, and the method further comprises: The electronic device performs digital amplification processing on the data of the target channel through the digital gain control unit.
10. The method according to any one of claims 1 to 9, characterized in that The first parameter includes a first cell identifier, where the first cell identifier is a cell identifier of a cellular network to which the electronic device currently accesses; The electronic device determines a scanning configuration according to the first parameter, including: The electronic device determines the scanning configuration according to the first cell identifier and a preconfigured first corresponding relationship; The first correspondence includes a correspondence between at least one cell identifier and a scanning configuration, and the at least one cell identifier includes the first cell identifier.
11. The method according to any one of claims 1 to 9, characterized in that The first parameter includes a first cell identifier, where the first cell identifier is a cell identifier of a cellular network to which the electronic device currently accesses; The electronic device determines a scanning configuration according to the first parameter, including: The electronic device determines the number of wireless access points AP corresponding to the current location according to the first cell identifier and a preconfigured second correspondence relationship; the second correspondence relationship includes a correspondence relationship between at least one cell identifier and the number of APs, and the at least one cell identifier includes the first cell identifier; The electronic device determines the scanning configuration according to the number of APs corresponding to the current location.
12. The method according to any one of claims 1 to 9, characterized in that The first parameter includes a first hardware parameter, and the first hardware parameter includes a hardware parameter of at least one AP; the at least one AP includes an AP in the environment where the electronic device is currently located and communicates with the electronic device through a 2.4 GHz frequency band; The electronic device determines a scanning configuration according to the first parameter, including: The electronic device determines, according to the first hardware parameter, the number of APs corresponding to the first hardware parameter; The electronic device determines the scanning configuration according to the number of APs.
13. The method according to claim 11 or 12, characterized in that: The electronic device determines the scanning configuration according to the number of APs, including: The electronic device determines, according to the number of APs being greater than a preset AP number threshold, that the scanning configuration includes a single-channel scanning configuration; or, The electronic device determines, according to the number of APs being less than a preset AP number threshold, that the scanning configuration includes a multi-channel scanning configuration.
14. The method according to claim 12 or 13, characterized in that Before the electronic device determines the scanning configuration according to the number of APs, the method further includes: The electronic device determines to continue scanning according to current service requirements.
15. The method according to claim 14, characterized in that The current service includes a positioning service, and a third corresponding relationship is preconfigured in the electronic device, wherein the third corresponding relationship includes a corresponding relationship between at least one hardware parameter and location information; When the current service demand corresponds to no longer performing scanning, the method includes: The electronic device provides the positioning service according to the third corresponding relationship and the first hardware parameter; wherein the first hardware parameter is included in the at least one hardware parameter.
16. The method according to any one of claims 12 to 15, characterized in that: Before the electronic device determines, according to the first hardware parameter, the number of APs corresponding to the first hardware parameter, the method further includes: The electronic device performs channel scanning of preset channels to determine a target channel in the preset channels; The hardware parameters of the AP that uses the target channel to communicate with the electronic device are obtained as the first hardware parameters.
17. The method according to claim 16, characterized in that In the case that the preset channels do not include the target channel, the method further includes: Perform a preset single-channel or multi-channel scan on all channels in the 2.4 Hz frequency band to determine the number of APs and / or target channels at the current location.
18. The method according to any one of claims 12 to 17, characterized in that: The hardware parameters include at least one of the following: Media access control MAC address, service set identifier SSID, basic service set identifier BSSID, extended service set identifier ESSID.
19. An electronic device, characterized in that: The electronic device comprises: a first antenna, a memory and one or more processors; the memory is coupled to the processor; the first antenna is coupled to the processor; The memory is used to store computer program codes, and the computer program codes include computer instructions. When the processor executes the computer instructions, the electronic device executes the method as claimed in any one of claims 1 to 18.
20. A chip system, characterized in that: The chip system is applied to an electronic device; the chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through lines; the interface circuit is used to receive a signal from a memory of the electronic device and send the signal to the processor, the signal including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1-18.