A wireless fidelity Wi-Fi scanning method and device

The idle channel of the Wi-Fi channel is filtered out through Bluetooth and targeted scanning is used for targeted scanning, which solves the problems of communication delay and high power consumption caused by Wi-Fi scanning, and achieves more efficient channel discovery and connection.

CN118509953BActive Publication Date: 2024-12-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311240863.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2024-12-27
Estimated Expiration
2043-09-25

AI Technical Summary

Technical Problem

Wi-Fi scans each channel causing higher communication delays between the access point and the STA and increasing power consumption.

Method used

Through Bluetooth, determine the sum of the RSSIs of the Wi-Fi signals whose RSSIs are greater than the preset threshold, and select N second Wi-Fi channels in the idle state, and scan these channels with Wi-Fi targeted , to reduce communication delay and power consumption.

Benefits of technology

It effectively reduces the communication delay and power consumption between STA and access point devices, and improves the accuracy and efficiency of Wi-Fi scanning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118509953B_ABST
    Figure CN118509953B_ABST
Patent Text Reader

Abstract

The present application provides a wireless fidelity Wi‑Fi scanning method and device, which relates to the field of communication technology and can solve the problem of communication delay and high power consumption between AP and STA caused by STA scanning each Wi‑Fi channel. The method is applied to electronic devices that support two wireless access technologies, Bluetooth and Wi‑Fi. The method includes: the electronic device determines M first Wi‑Fi channels through Bluetooth; each of the M first Wi‑Fi channels includes multiple Wi‑Fi signals, and the sum of the wireless received signal strength RSSI of the multiple Wi‑Fi signals is greater than a preset threshold; the electronic device selects N second Wi‑Fi channels in an idle state from the M first Wi‑Fi channels through Bluetooth; the electronic device scans each second Wi‑Fi channel in the N second Wi‑Fi channels through Wi‑Fi.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a Wi-Fi scanning method and terminal. Background Art

[0002] An access point (AP) is a device with wireless communication function, supports communication using wireless local area network (WLAN) protocol, and has the function of communicating with other devices (such as stations (STA)) in a WLAN network.

[0003] Generally, in a WLAN network, a STA needs to scan each wireless fidelity (Wi-Fi) channel to find an available AP and establish a Wi-Fi connection with it. Since Wi-Fi has many channels in different frequency bands, scanning each Wi-Fi channel will cause a high communication delay between the AP and the STA and increase power consumption. Summary of the invention

[0004] The present application provides a Wi-Fi scanning method and device for solving the problem of communication delay and high power consumption between AP and STA caused by STA scanning each Wi-Fi channel.

[0005] In order to achieve the above purpose, this application specifically adopts the following technical solutions:

[0006] In a first aspect, a Wi-Fi scanning method is provided, which is applied to an electronic device, and the electronic device supports at least two wireless access technologies, Bluetooth and Wi-Fi. The method includes: the electronic device determines M first Wi-Fi channels through Bluetooth; each of the M first Wi-Fi channels includes multiple Wi-Fi signals, and the sum of the wireless received signal strength RSSI of the multiple Wi-Fi signals is greater than a preset threshold; M≥1; the electronic device selects N second Wi-Fi channels from the M first Wi-Fi channels through Bluetooth; each of the N second Wi-Fi channels is in an idle state; wherein N≥1, and M≥N; the electronic device scans each of the N second Wi-Fi channels through Wi-Fi.

[0007] Based on the first aspect, the electronic device determines, through Bluetooth, M first Wi-Fi channels whose sum of RSSI of Wi-Fi signals is greater than a preset threshold, and then selects N second Wi-Fi channels in an idle state from the M first Wi-Fi channels. Finally, the electronic device uses Wi-Fi to specifically scan the N second Wi-Fi channels in an idle state, thereby solving the problem of high communication delay between the access point device and the electronic device caused by the electronic device scanning each Wi-Fi channel. In addition, since the power consumption of Bluetooth scanning is low, the Wi-Fi channels in an idle state are first determined through Bluetooth, and then Wi-Fi specifically scans the Wi-Fi channels in an idle state, which can also solve the problem of high power consumption caused by Wi-Fi scanning each Wi-Fi channel.

[0008] In a possible implementation manner of the first aspect, the method further includes: for each first Wi-Fi channel of the M first Wi-Fi channels, the electronic device collects, through Bluetooth, an RSSI of a Wi-Fi signal in the first Wi-Fi channel to obtain Z first vectors, where Z is a positive integer; and the electronic device detects the Z first vectors to determine whether the first Wi-Fi channel is in an idle state.

[0009] In this implementation, the electronic device collects the RSSI of the Wi-Fi signal in the first Wi-Fi channel through Bluetooth to obtain Z first vectors, that is, after obtaining the RSSI sequence, the RSSI sequence is arranged into a vector, and then the electronic device detects the Z first vectors to determine whether the first Wi-Fi channel is in an idle state, which can not only reduce power consumption but also improve the accuracy of determining whether the Wi-Fi channel is in an idle state.

[0010] In a possible implementation of the first aspect, the electronic device detects Z first vectors to determine whether the first Wi-Fi channel is in an idle state, including: the electronic device performs one or more of similarity detection, common segment number detection, and duty cycle detection on the Z first vectors to determine whether the first Wi-Fi channel is in an idle state. The common segment number is used to indicate the number of consecutive 1s for which the logical sum of binarization results of the corresponding elements of each first vector in the Z first vectors is 1.

[0011] In this implementation, by performing similarity detection, common segment number detection, and duty cycle detection on the Z first vectors, the accuracy of determining whether the first Wi-Fi channel is in an idle state can be improved.

[0012] In a possible implementation manner of the first aspect, the first Wi-Fi channel being in an idle state includes one or more of: a similarity of the Z first vectors is greater than or equal to a similarity threshold, a number of common segments of the Z first vectors is within a first preset range, and a duty cycle of the Z first vectors is within a second preset range.

[0013] In a possible implementation of the first aspect, the electronic device performs similarity detection on the Z first vectors, including: the electronic device detects the similarity of the Z first vectors using a floating point representation; or the electronic device detects the similarity of the Z first vectors using a fixed point representation. The floating point representation is used to indicate that the similarity of the Z first vectors is detected after normalization processing is performed on the Z first vectors; the fixed point representation is used to indicate that the similarity of the Z first vectors is detected after binarization processing is performed on the Z first vectors.

[0014] In this implementation, if the access point device periodically broadcasts beacon frames in the Wi-Fi channel, then there will be a high similarity between the first vectors. Therefore, by detecting the similarity of the Z first vectors, it can be determined whether the access point device periodically broadcasts beacon frames in the Wi-Fi channel, thereby determining whether the first Wi-Fi channel is in an idle state. The electronic device uses a floating point representation to detect the similarity of the Z first vectors, which can further reduce power consumption; the electronic device uses a fixed point representation to detect the similarity of the Z first vectors, which can save cost and power consumption, and the calculation is simple.

[0015] In a possible implementation of the first aspect, the electronic device detects the similarity of Z first vectors using a floating point representation, including: the electronic device calculates the similarity between every two first vectors among the Z first vectors, and uses the sum of the similarities between every two first vectors as the similarity of the Z first vectors; or, the electronic device calculates the similarity between two adjacent first vectors among the Z first vectors, and uses the sum of the similarities between two adjacent first vectors as the similarity of the Z first vectors.

[0016] In this implementation, the electronic device calculates the similarity between every two first vectors among the Z first vectors, and uses the sum of the similarities between every two first vectors as the similarity of the Z first vectors, which can improve the accuracy of calculating the similarity. The electronic device calculates the similarity between two adjacent first vectors among the Z first vectors, and uses the sum of the similarities between two adjacent first vectors as the similarity of the Z first vectors, which can reduce the amount of calculation of the similarity.

[0017] In a possible implementation of the first aspect, the electronic device detects the similarity of Z first vectors using a fixed-point number representation, including: the electronic device calculates the dissimilarity between every two first vectors among the Z first vectors, and uses the sum of the dissimilarity between every two first vectors as the similarity of the Z first vectors; or, the electronic device calculates the dissimilarity between two adjacent first vectors among the Z first vectors, and uses the sum of the dissimilarity between two adjacent first vectors as the similarity of the Z first vectors.

[0018] In this implementation, the electronic device calculates the dissimilarity between every two first vectors among the Z first vectors, and uses the sum of the dissimilarity between every two first vectors as the similarity of the Z first vectors, which can improve the accuracy of calculating the similarity. The electronic device calculates the dissimilarity between two adjacent first vectors among the Z first vectors, and uses the sum of the dissimilarity between two adjacent first vectors as the similarity of the Z first vectors, which can reduce the amount of calculation of the similarity.

[0019] In a possible implementation manner of the first aspect, the electronic device collects the RSSI of the Wi-Fi signal in the first Wi-Fi channel through Bluetooth to obtain Z first vectors, including: the electronic device scans the Bluetooth channel overlapping with the first Wi-Fi channel through Bluetooth, collects the RSSI of the Wi-Fi signal in the first Wi-Fi channel, and obtains the Z first vectors.

[0020] In a possible implementation manner of the first aspect, the electronic device scans a Bluetooth channel that overlaps with a first Wi-Fi channel through Bluetooth, collects an RSSI of a Wi-Fi signal in the first Wi-Fi channel, and obtains Z first vectors, including: the electronic device cyclically scans the Bluetooth channel that overlaps with the first Wi-Fi channel through Bluetooth in each of the Z cycles, collects the RSSI of the Wi-Fi signal in the first Wi-Fi channel, and obtains the Z first vectors.

[0021] In a possible implementation manner of the first aspect, the period is a target beacon transmission time TBTT.

[0022] In a possible implementation manner of the first aspect, the electronic device determines M first Wi-Fi channels through Bluetooth, including: the electronic device scans Bluetooth channels in a first frequency band through Bluetooth, and collects RSSIs of Wi-Fi signals in the Wi-Fi channels in the first frequency band; the electronic device detects RSSIs of Wi-Fi signals in the Wi-Fi channels in the first frequency band through Bluetooth, and determines the M first Wi-Fi channels; wherein the Bluetooth channels in the first frequency band overlap with the Wi-Fi channels in the first frequency band.

[0023] In a possible implementation manner of the first aspect, the electronic device scans each second Wi-Fi channel of N second Wi-Fi channels through Wi-Fi, including: a Wi-Fi module of the electronic device receives, through a processor, channel identifiers of the N second Wi-Fi channels from a Bluetooth module; and the Wi-Fi module of the electronic device scans each second Wi-Fi channel of the N second Wi-Fi channels based on the channel identifiers of the N second Wi-Fi channels.

[0024] In a second aspect, an electronic device is provided, which has the function of implementing any one of the functions in the first aspect, and the function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0025] According to a third aspect, an electronic device is provided, comprising a memory and one or more processors; wherein the memory is used to store computer instructions, and when the electronic device is running, the processor executes the computer instructions of the memory so that the electronic device executes any one of the methods described in the first aspect.

[0026] In a fourth aspect, a communication device is provided. The communication device can be applied to the electronic device in the above-mentioned first aspect or a possible design of the first aspect to realize the functions performed by the above-mentioned electronic device. The communication device can be an electronic device, or a chip or system on chip of an electronic device, etc. The communication device can execute the functions performed by the above-mentioned electronic device through hardware, or execute the corresponding software implementation through hardware.

[0027] In a fifth aspect, a communication device is provided, the communication device comprising one or more processors; the one or more processors are used to run a computer program or instruction, and when the one or more processors execute the computer program or instruction, the communication device executes the method as described in any aspect of the first aspect. The communication device can be an electronic device, or a chip or system on chip of an electronic device.

[0028] In a sixth aspect, a chip system is provided, comprising: at least one processor and an interface, the interface being used to receive instructions and transmit them to at least one processor; at least one processor executes the instructions so that the electronic device executes the method described in any one of the above-mentioned first aspects.

[0029] In a seventh aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute any of the methods described in the first aspect.

[0030] In an eighth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect.

[0031] Among them, the technical effects brought about by any implementation method in the above-mentioned second to eighth aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of the structure of a communication system provided in an embodiment of the present application;

[0033] Figure 2 A schematic diagram of the composition of a communication device provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of the structure of a site device provided in an embodiment of the present application;

[0035] Figure 4 A schematic diagram of an idle state / busy state of a Wi-Fi channel provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of a Wi-Fi channel state provided in an embodiment of the present application;

[0037] Figure 6 A flowchart of a Wi-Fi scanning method provided in an embodiment of the present application;

[0038] Figure 7 A schematic diagram of a BLE channel and a Wi-Fi channel overlapping provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of scanning a BLE channel provided in an embodiment of the present application;

[0040] Fig. 9 A schematic diagram of the relationship between the sum of RSSIs of a Wi-Fi network corresponding to a Wi-Fi channel and a preset threshold value provided in an embodiment of the present application;

[0041] Fig.10 A schematic diagram of scanning a BLE channel that overlaps with a first Wi-Fi channel provided in an embodiment of the present application;

[0042] Fig.11 A schematic diagram of an access point device broadcasting a beacon frame in a Wi-Fi channel provided in an embodiment of the present application;

[0043] Fig.12 A schematic diagram of a common segment number provided in an embodiment of the present application;

[0044] Fig.13 A schematic diagram of a vector shift provided in an embodiment of the present application;

[0045] Fig.14 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] The embodiments of the present application can be applicable to WLAN scenarios, and can be applicable to the Institute of Electrical and Electronics Engineers (IEEE) 802.11 system standards, such as the 802.11a / b / g standards, 802.11n standards, 802.11ac standards, 802.11ax standards, or their next generations, such as the 802.11be standards or even later generations.

[0047] Among them, standards before the 802.11n standard, such as 802.11a / b / g, etc., can be collectively referred to as non-high throughput (non-HT) standards. The 802.11n standard can be referred to as a high throughput (HT) standard. The 802.11ac standard can be referred to as a very high throughput (VHT) standard. The 802.11ax standard can be referred to as a high efficient (HE) standard, or as the sixth wireless fidelity (Wi-Fi 6) standard. The 802.11be standard can be referred to as an extremely high throughput (EHT) standard, or as the Wi-Fi 7 standard. The next generation of the 802.11 standard can be referred to as an ultra-high reliability (UHR) standard or a standard named otherwise, or as the Wi-Fi 8 standard, without limitation.

[0048] For example, Figure 1 This is a schematic diagram of a communication system provided in an embodiment of the present application. The communication system may be a system using the 802.11 standard. For example, the 802.11 standard includes, but is not limited to, the 802.11ax standard, the 802.11be standard, or a later generation of the 802.11 standard. Among them, the communication system may include an access point device and an electronic device, and the electronic device may be a device capable of performing WLAN communication with the access point device. For example, the electronic device may be a site device. In the following embodiments, the electronic device is taken as an example of a site device to introduce the technical solution of the embodiment of the present application.

[0049] like Figure 1 As shown, the communication system may include one or more access point devices and one or more station devices. The access point device may be an access point (AP) or a chip or processing system installed in an AP. The station device may be a station (STA) or a chip or processing system installed in a STA.

[0050] Optionally, the embodiments of the present application are applicable to communication scenarios between one or more transmitting end communication devices and one or more receiving end communication devices. For example, the communication scenario may be a communication scenario between an AP and a STA, or a communication scenario between an AP and an AP, or a communication scenario between a STA and a STA, without limitation.

[0051] Exemplarily, the AP may be a device that supports multiple WLAN standards, such as the 802.11a / b / g standard, the 802.11n standard, the 802.11ac standard, the 802.11ax standard, the 802.11be standard, or a next-generation 802.11 standard.

[0052] Among them, AP can be a device with wireless communication function, supports communication using WLAN protocol, has the function of communicating with other devices in the WLAN network (such as stations or other access points), and of course, can also have the function of communicating with other devices. In the WLAN communication system, the access point can also be called an access point station (AP STA). The device with wireless communication function can be a complete device, or a chip or processing system installed in the complete device. The device installed with these chips or processing systems can implement the methods and functions of the embodiments of the present application under the control of the chip or processing system. The AP in the embodiment of the present application is a device that provides services for STA and can support the 802.11 series of protocols.

[0053] For example, AP can be a communication entity such as a communication server, router, switch, bridge, computer, mobile phone, etc. AP can also be various forms of macro base stations, micro base stations, relay stations, etc. AP can also be a chip and processing system in these various forms of devices. AP can also be a terminal device or network device with a Wi-Fi chip. AP can also be an access point for mobile users to enter the priority network. It is mainly deployed in homes, buildings and parks. The typical coverage radius is tens of meters to hundreds of meters. Of course, it can also be deployed outdoors. AP is equivalent to a bridge connecting wired networks and wireless networks. Its main function is to connect various wireless network clients together and then connect the wireless network to Ethernet.

[0054] Exemplarily, the STA may be a device that supports multiple WLAN standards, such as the 802.11a / b / g standard, the 802.11n standard, the 802.11ac standard, the 802.11ax standard, and the 802.11be standard.

[0055] Among them, STA can be a device with wireless communication function, supports communication using WLAN protocol, and has the ability to communicate with other stations or access points in the WLAN network. In the WLAN system, the station can be called a non-access point station (non-AP STA). STA can be any user communication device that allows the user to communicate with the AP and then communicate with the WLAN. The device with wireless communication function can be a complete device, or it can be a chip or processing system installed in the complete device. The device installed with these chips or processing systems can implement the methods and functions of the embodiments of the present application under the control of the chip or processing system.

[0056] For example, STA can be a user device that can be connected to the Internet, such as a communication server, a router, a switch, a bridge, a computer, a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a mobile phone, a set-top box, a smart TV, a smart wearable device, or an IoT node in the Internet of Things, or an in-vehicle communication device in the Internet of Vehicles, or an entertainment device, a gaming device or system, a global positioning system device, etc. STA can also be a chip and a processing system in the above-mentioned devices. STA can also be a wireless communication chip, a wireless sensor, or a wireless communication terminal.

[0057] When implementing it specifically, Figure 1 As shown: Each access point device and site device can use Figure 2 The structure shown, or including Figure 2 Parts shown. Figure 2 Schematic diagram of the composition of a communication device 100 provided in an embodiment of the present application. Figure 2 As shown, the communication device 100 may include a processor 101 , a transceiver 102 , and a communication line 103 .

[0058] Furthermore, the communication device 100 may further include a memory 104. The processor 101, the memory 104 and the transceiver 102 may be connected via a communication line 103.

[0059] The processor 101 is a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 101 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.

[0060] The transceiver 102 is used to communicate with other devices or other communication networks. The other communication networks may be Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The transceiver 102 may be a module, a circuit, a transceiver or any device capable of achieving communication.

[0061] The communication line 103 is used to transmit information between the components included in the communication device 100 .

[0062] The memory 104 is used to store instructions, where the instructions may be computer programs.

[0063] The memory 104 may be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc., without limitation.

[0064] It should be noted that the memory 104 can exist independently of the processor 101, or can be integrated with the processor 101. The memory 104 can be used to store instructions or program codes or some data, etc. The memory 104 can be located in the communication device 100 or outside the communication device 100, without limitation. The processor 101 is used to execute the instructions stored in the memory 104 to implement the communication method provided in the following embodiments of the present application.

[0065] In one example, the processor 101 may include one or more CPUs, such as Figure 2 CPU0 and CPU1 in.

[0066] As an optional implementation, the communication device 100 includes multiple processors, for example, Figure 2 In addition to the processor 101, a processor 107 may also be included.

[0067] As an optional implementation, the communication device 100 further includes an output device 105 and an input device 106. Exemplarily, the input device 106 is a keyboard, a mouse, a microphone, a joystick, and the like, and the output device 105 is a display screen, a speaker, and the like.

[0068] It should be pointed out that Figure 2 The structure shown in the figure does not constitute a limitation on the communication device, except Figure 2 In addition to the components shown, the communication device may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0069] In the embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.

[0070] In addition, the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiments of the present application is only an example, and other names can also be used in the specific implementation without limitation.

[0071] The technical solution provided by the embodiments of the present application is described in detail below in conjunction with the accompanying drawings.

[0072] Combination Figure 1In the communication system shown, the station device can establish a communication connection with the access point device via Wi-Fi. Exemplarily, the station device scans the surrounding access point devices via Wi-Fi, and the access point device sends a service set identifier (SSID) to the station device. After the station device receives the SSID sent by the access point device, it selects the corresponding SSID and performs authentication. If the authentication is successful, the station device negotiates the communication channel with the access point device, and the station device periodically listens to the beacon frame sent by the access point device to establish a communication connection with the access point device.

[0073] In the above scheme, on the one hand, the station device and the access point device must first discover and authenticate each other before establishing a communication connection. The mutual discovery and authentication process requires the station device to scan all Wi-Fi channels to find the surrounding access point devices, resulting in a high communication delay between the station device and the access point device. On the other hand, the station device scanning all Wi-Fi channels will also increase power consumption.

[0074] In order to solve the above technical problems, an embodiment of the present application provides a Wi-Fi scanning method, which is applied to a site device, and the site device is a communication device that supports Bluetooth access technology and Wi-Fi access technology. Specifically, the method includes: the site device scans the wireless received signal strength (RSSI) in the Wi-Fi signal through Bluetooth, detects the quality status of the Wi-Fi channel, and determines the Wi-Fi channel that is in an idle state and has service. Then, the site device uses Wi-Fi to scan the Wi-Fi channel that is in an idle state and has service, and establishes a communication connection with the access point device.

[0075] Among them, Bluetooth includes classic Bluetooth and low energy Bluetooth (bluetooth low energy, BLE). Classic Bluetooth includes (basic rate, BR) and (enhanced data rate, EDR).

[0076] In the embodiment of the present application, since the resolution of Bluetooth access technology is high and the power consumption is low during scanning, Bluetooth is used as a leading scan to effectively reduce power consumption by scanning the RSSI in the Wi-Fi signal through Bluetooth; in addition, the site device detects the quality status of the Wi-Fi channel through Bluetooth, and after determining the Wi-Fi channel that is idle and has service, the site device uses Wi-Fi to scan the Wi-Fi channel that is idle and has service, which can effectively reduce the communication delay between the site device and the access point device. It should be noted that in the following embodiments, Bluetooth is used as BLE as an example to introduce the technical solution of the embodiment of the present application.

[0077] Take the site equipment as a system on chip as an example. Figure 3 A schematic diagram of the structure of a site device provided in an embodiment of the present application. For example, Figure 3 As shown, the station device may include a processor 201, a BLE module 202 and a Wi-Fi module 203; wherein the processor 201 may be Figure 2 The processor 101 shown may also be the processor 107, without limitation. Optionally, the processor 201 may be a CPU. The BLE module 202 and the Wi-Fi module 203 may also be Figure 2 The components included in the communication device shown. Among them, Figure 2 The BLE module and Wi-Fi module are not shown.

[0078] like Figure 3 As shown, the BLE module 202 includes an energy detector (reaccepted signal strength indicator, RSSI) 2021 and a detection module 2022; wherein the energy detector 2201 is used to collect the RSSI of the Wi-Fi signal in the Wi-Fi channel and transmit the collected RSSI to the detection module 2022. The detection module 2022 is used to detect the RSSI and determine the Wi-Fi channel in the idle state.

[0079] Still Figure 3 As shown, the Wi-Fi module 203 includes a Wi-Fi scanning module 2031, and the Wi-Fi scanning module 2031 is used to scan the Wi-Fi channels in the idle state.

[0080] Optional, such as Figure 3 As shown, the processor 201 can send an indication message to the BLE module 202 to instruct the BLE module 202 to collect the RSSI of the Wi-Fi signal in the Wi-Fi channel. Optionally, in all scenarios where the site device needs to connect to the access point device via Wi-Fi, the processor 201 can send an indication message to the BLE module 202. For example, when the site device has been connected to the access point device via Wi-Fi, but the Wi-Fi connection is unstable, the processor 201 sends an indication message to the BLE module 202; or, before the site device connects to the access point device via Wi-Fi, the processor 201 sends an indication message to the BLE module 202 without restriction.

[0081] Optionally, the processor 201 sends an indication message to the BLE module 202, specifically: the processor 201 sends an indication message to the energy detector 2201 through the detection module 2022, and after receiving the indication message, the energy detector 2021 collects the RSSI of the Wi-Fi signal in the Wi-Fi channel, so that the detection module 2202 determines the Wi-Fi channel in the idle state.

[0082] Then, the detection module 2202 reports the channel identifier of the idle Wi-Fi channel to the processor 201. The processor 201 configures the channel identifier of the idle Wi-Fi channel to the Wi-Fi scanning module 2031. The Wi-Fi scanning module 2031 scans the Wi-Fi channel corresponding to the channel identifier based on the channel identifier to find an available access point device and establish a communication connection with it.

[0083] In an embodiment of the present application, for a site device that supports both BLE access technology and Wi-Fi access technology, information of the Wi-Fi channel can be scanned jointly by BLE and Wi-Fi to reduce power consumption of Wi-Fi scanning and reduce communication delay between the site device and the access point device.

[0084] Exemplarily, BLE access technology and Wi-Fi access technology use communication protocols such as media access control protocol (MAC) and physical layer (PHY) for communication. Since the communication protocols (such as MAC and PHY) used by BLE access technology are independent of the communication protocols (such as MAC and PHY) used by Wi-Fi access technology, BLE and Wi-Fi cannot synchronize data with each other, parse data frames and other operations. Based on this, the site device can collect the RSSI of the Wi-Fi signal in the Wi-Fi channel through the BLE energy detector 2201, and detect the signal strength (or energy) of the RSSI of the Wi-Fi signal in the Wi-Fi channel, and detect the state of the Wi-Fi channel (such as idle state / busy state) and whether there is a service (such as whether it includes an access point device) through the change of energy. After the site device determines the Wi-Fi channel in the idle state through BLE, the site device scans the Wi-Fi channel in the idle state through Wi-Fi, finds an available access point device, and establishes a communication connection with it. Since BLE scanning has high resolution and low power consumption, the site device uses BLE as a leading scan. After determining the idle Wi-Fi channel, it uses Wi-Fi to specifically scan the idle Wi-Fi channel. This can solve the problems of high power consumption of Wi-Fi scanning and high communication delay between the site device and the access point device.

[0085] It should be noted that the processor 201 , the BLE module 202 and the Wi-Fi module 203 may be independent discrete devices or may be integrated into the same communication module without limitation.

[0086] In addition, in the embodiment of the present application, since the BLE and Wi-Fi channels overlap in the 2.4 GHz frequency band, the BLE channel can be scanned through BLE to collect the RSSI of the Wi-Fi network in the Wi-Fi channel that overlaps with the BLE channel.

[0087] It should be noted that a Wi-Fi channel that is in an idle state and has service means that the access point device has not accessed a site device in the Wi-Fi channel, that is, no communication connection is established with the site device in the Wi-Fi channel, and the access point device periodically sends / broadcasts beacon frames in the Wi-Fi channel.

[0088] Correspondingly, the state of the Wi-Fi channel also includes a busy state corresponding to the idle state; wherein the Wi-Fi channel being in a busy state means that: the access point device establishes a communication connection with multiple site devices in the Wi-Fi channel, and exchanges data with the site devices in the Wi-Fi channel.

[0089] For example, Figure 4 A schematic diagram of a Wi-Fi channel idle state / busy state provided in an embodiment of the present application. Figure 4 As shown in (a), there is no station device (such as STA1, STA2, and STA3) accessing the access point device (such as AP) on the Wi-Fi channel; or in the Wi-Fi channel, the access point device (such as AP) periodically broadcasts beacon frames, so Figure 4 The Wi-Fi channel shown in (a) is in an idle state, that is, the Wi-Fi channel is not occupied.

[0090] For example, Figure 4 As shown in (b) in FIG, the access point device (such as AP) and the station device (STA1) are exchanging data in the Wi-Fi channel, and STA2 and STA3 are in a waiting state. Figure 4 The Wi-Fi channel shown in (b) is in a busy state, that is, the Wi-Fi channel is occupied.

[0091] For example, Figure 5 The following is a schematic diagram of a Wi-Fi channel state provided in an embodiment of the present application, wherein the horizontal axis represents time and the vertical axis represents frequency. Figure 5As shown, the frequency of beacon frames in Wi-Fi channel 11 is relatively high, and the beacon frames in Wi-Fi channel 11 appear at a fixed time point in each cycle, and the length of the beacon frames in each cycle is equal, indicating that Wi-Fi channel 11 is not occupied and is in an idle state.

[0092] Still Figure 5 As shown, the access point device broadcasts beacon frames at a low frequency on Wi-Fi channel 1, Wi-Fi channel 3, Wi-Fi channel 6, and Wi-Fi channel 7, and the duration of data interaction between the access point device and the station device in the above Wi-Fi channels is different in each cycle, indicating that the access point device exchanges data with the station device in the above Wi-Fi channels, that is, Wi-Fi channel 1, Wi-Fi channel 3, Wi-Fi channel 6, and Wi-Fi channel 7 are occupied and in a busy state. The lower the frequency of beacon frame broadcasting by the access point device in the Wi-Fi channel, and the longer the duration of data interaction between the access point device and the station device in the Wi-Fi channel, the more occupied the Wi-Fi channel is. Figure 5 As shown, the occupancy level of Wi-Fi channel 1 is higher than that of Wi-Fi channel 3, Wi-Fi channel 6, and Wi-Fi channel 7.

[0093] Combine the following Figure 3 The site equipment shown is as follows Figure 6 , the Wi-Fi scanning method provided in the embodiment of the present application is described. Among them, the site device in the embodiment of the present application can be Figure 1 Any STA in the communication system shown, the access point device can be Figure 1 Any AP in the communication system shown. The STA and AP shown in the following embodiments may have Figure 3 The processing performed by a single execution subject (station device or access point device) shown in the embodiments of the present application may also be divided into multiple execution subjects, which may be logically and / or physically separated without limitation.

[0094] Figure 6 A flowchart of a Wi-Fi scanning method provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the method may include the following steps.

[0095] S301. A site device determines M first Wi-Fi channels through BLE. Each of the M first Wi-Fi channels includes multiple Wi-Fi signals, and a sum of RSSIs of the multiple Wi-Fi signals is greater than a preset threshold.

[0096] Exemplarily, the station device may scan BLE channels through BLE, collect RSSIs of Wi-Fi signals, and determine M first Wi-Fi channels by detecting the RSSIs of Wi-Fi signals; M≥1.

[0097] For example, due to the high data transmission advantages on the 2.4GHz frequency band (such as high bandwidth, long transmission distance, strong signal penetration, strong anti-interference, etc.), most of the Wi-Fi information (such as RSSI) of Wi-Fi signals is concentrated in the Wi-Fi channel of the 2.4GHz frequency band; and the BLE channel and the Wi-Fi channel overlap in the 2.4GHz frequency band (or the first frequency band), so the site device can scan the BLE channel of the 2.4GHz frequency band through BLE and collect the RSSI of the Wi-Fi signal in the Wi-Fi channel of the 2.4GHz frequency band. By detecting the RSSI of the Wi-Fi signal in the Wi-Fi channel of the 2.4GHz frequency band, M first Wi-Fi channels are determined.

[0098] Optionally, the site device may scan some (or all) BLE channels in the 2.4 GHz frequency band through BLE to collect RSSIs of Wi-Fi signals in some (or all) Wi-Fi channels in the 2.4 GHz frequency band. M first Wi-Fi channels are determined by detecting RSSIs of Wi-Fi signals in some (or all) Wi-Fi channels in the 2.4 GHz frequency band.

[0099] Figure 7 A schematic diagram of a BLE channel and a Wi-Fi channel overlap provided in an embodiment of the present application. Figure 7 As shown in the figure, the 2.4GHz frequency band includes 13 Wi-Fi channels and 39 BLE channels; the 13 Wi-Fi channels overlap with the 39 BLE channels. For example, Wi-Fi channel 1 overlaps with BLE channels 0 to 10; Wi-Fi channel 7 overlaps with BLE channels 15 to 25; Wi-Fi channel 13 overlaps with BLE channels 28 to 39, etc. For other examples of Wi-Fi channels overlapping with BLE channels, please refer to Figure 8 As shown, no further elaboration is given.

[0100] It should be noted that Figure 7 The order of the BLE channels shown is only an example and does not constitute a limitation of the present application. Currently, the BLE channels can also be arranged in other orders, which will not be repeated here. For example, Wi-Fi channel 1 overlaps with BLE channel 37, BLE channel 0 to BLE channel 9, etc.

[0101] Exemplarily, the site device can scan BLE channels 0 to BLE channels 10 through BLE, and collect the RSSI of the Wi-Fi signal in Wi-Fi channel 1. Correspondingly, the site device can scan BLE channels 15 to BLE channels 25 through BLE, and collect the RSSI of the Wi-Fi signal in Wi-Fi channel 7. Correspondingly, the site device can also scan BLE channels 28 to BLE channels 39 through BLE, and collect the RSSI of the Wi-Fi signal in Wi-Fi channel 13, and so on. In this way, all BLE channels on the 2.4 GHz frequency band can be scanned, and the RSSI of the Wi-Fi signals in all Wi-Fi channels on the 2.4 GHz frequency band can be collected.

[0102] As an example, the site device scans all BLE channels on the 2.4GHz band within a period. Exemplarily, the period can be the target beacon transmission time (TBTT), or the target beacon transmission interval. TBTT is used to indicate the period of the access point device broadcasting beacon frames, that is, the access point device periodically sends beacon frames with a period of TBTT (e.g., 102.4ms).

[0103] Since the access point device broadcasts the beacon frame within a period (ie, TBTT), the site device scans all BLE channels on the 2.4 GHz frequency band with TBTT as a period, which can improve the reliability of collecting the RSSI of the Wi-Fi signal in the Wi-Fi channel.

[0104] Figure 8 A schematic diagram of scanning a BLE channel provided in an embodiment of the present application; wherein the horizontal axis represents the time slot, and the vertical axis represents the BLE channel. For example, Figure 8 As shown, the station device scans all BLE channels on the 2.4GHz frequency band with TBTT as the period. Taking 640 RSSIs collected in one TBTT as an example, in one TBTT, the time slot for the station device to scan a BLE channel is 160us (microseconds).

[0105] For example, Figure 8 As shown, the station device scans BLE channel 1 in the first time slot, scans BLE channel 4 in the second time slot, scans BLE channel 7 in the third time slot, scans BLE channel 10 in the fourth time slot, and so on, until all BLE channels on the 2.4 GHz frequency band are scanned.

[0106] It should be noted that in an embodiment of the present application, if 640 RSSIs are collected within one TBTT, and the 2.4 GHz frequency band includes 40 BLE channels, after scanning the 40 BLE channels, the first BLE channel is scanned next, that is, the BLE channels are cyclically scanned within one TBTT.

[0107] also, Figure 8 Only some BLE channels on the 2.4GHz band are shown, not all BLE channels. Figure 8 The scanning BLE channel shown is only an example of an embodiment of the present application and does not constitute a limitation of the present application. Figure 8 BLE signals not shown in the figure (such as BLE channel 0, BLE channel 2, etc.) can all be used Figure 8 Scan according to the process shown.

[0108] Exemplary, combined Figure 7 ,like Figure 8 As shown, within one TBTT, the site device scans BLE channel 1, BLE channel 4, BLE channel 7, and BLE channel 10, and can collect the RSSI of the Wi-Fi signal in Wi-Fi channel 1. Correspondingly, within one TBTT, the site device scans BLE channel 15, BLE channel 16, BLE channel 19, BLE channel 22, and BLE channel 23, and can collect the RSSI of the Wi-Fi signal in Wi-Fi channel 7. Correspondingly, the site device scans BLE channel 30, BLE channel 31, BLE channel 34, and BLE channel 39, and can collect the RSSI of the Wi-Fi signal in Wi-Fi channel 13. Based on the above process, the site device can collect the RSSI of the Wi-Fi signal in each of the 13 Wi-Fi channels.

[0109] After the site device scans all BLE channels on the 2.4 GHz frequency band and collects the RSSI of the Wi-Fi signal in each Wi-Fi channel in all Wi-Fi channels on the 2.4 GHz frequency band, the site device accumulates the RSSI values ​​of the Wi-Fi signal in each Wi-Fi channel to obtain the sum of the RSSI of the Wi-Fi signal in each Wi-Fi channel (i.e., the accumulated sum). Then, the site device determines M first Wi-Fi channels according to the sum of the RSSI of the Wi-Fi signals in the Wi-Fi channels and a preset threshold.

[0110] The site device uses the Wi-Fi channel corresponding to the sum of the RSSIs of the Wi-Fi signals being greater than the preset threshold as the first Wi-Fi channel, thereby obtaining M first Wi-Fi channels. In other words, the sum of the RSSIs of the Wi-Fi signals in each of the M first Wi-Fi channels is greater than the preset threshold.

[0111] It should be noted that the preset threshold value can be set according to actual needs without limitation. For example, the preset threshold value can be set to 0.

[0112] For example, Fig. 9 As shown, Wi-Fi channel 2, Wi-Fi channel 3, Wi-Fi channel 6, Wi-Fi channel 7, Wi-Fi channel 12, and Wi-Fi channel 13 exceed the preset threshold, so the M first Wi-Fi channels determined by the site device include: Wi-Fi channel 2, Wi-Fi channel 3, Wi-Fi channel 6, Wi-Fi channel 7, Wi-Fi channel 12, and Wi-Fi channel 13.

[0113] S302: The station device selects N second Wi-Fi channels from the M first Wi-Fi channels through BLE; each of the N second Wi-Fi channels is in an idle state.

[0114] The site device may rescan some (or all) of the BLE channels that overlap with the M first Wi-Fi channels, and collect the RSSI of the Wi-Fi signal in each of the M first Wi-Fi channels. Then, the site device detects the RSSI of the Wi-Fi signal in each of the M first Wi-Fi channels, and determines the N second Wi-Fi channels that are in an idle state.

[0115] Exemplarily, for each of the M first Wi-Fi channels, the station device scans the BLE channel that overlaps with the first Wi-Fi channel through BLE, collects the RSSI of the Wi-Fi signal in the first Wi-Fi channel, and obtains Z first vectors. Each element in the first vector is used to indicate an RSSI.

[0116] Taking the M first Wi-Fi channels including Wi-Fi channel 3, Wi-Fi channel 7, and Wi-Fi channel 13 as an example, illustratively, the site device scans the BLE channel overlapping with Wi-Fi channel 3 through BLE, collects the RSSI of the Wi-Fi signal in Wi-Fi channel 3, and obtains Z first vectors. Correspondingly, the site device scans the BLE channel overlapping with Wi-Fi channel 7 through BLE, collects the RSSI of the Wi-Fi signal in Wi-Fi channel 7, and obtains Z first vectors. Correspondingly, the site device scans the BLE channel overlapping with Wi-Fi channel 13 through BLE, collects the RSSI of the Wi-Fi signal in Wi-Fi channel 13, and obtains Z first vectors.

[0117] Optionally, for each first Wi-Fi channel in the M first Wi-Fi channels, the site device cyclically scans the BLE channel that overlaps with the first Wi-Fi channel in each of the Z cycles, collects the RSSI of the Wi-Fi signal in the first Wi-Fi channel, and obtains Z first vectors. Optionally, the cycle may be TBTT. One cycle corresponds to one first vector.

[0118] It can be understood that since the access point device broadcasts beacon frames with a TBTT period, the site device cyclically scans the BLE channel that overlaps with the first Wi-Fi channel through BLE within TBTT, which can improve the reliability of collecting the RSSI of the Wi-Fi signal in the first Wi-Fi channel.

[0119] Fig.10 A schematic diagram of scanning a BLE channel that overlaps with a first Wi-Fi channel provided in an embodiment of the present application; wherein the horizontal axis represents a time slot, and the vertical axis represents a BLE channel. For example, Fig.10 As shown, the station device scans the BLE channel that overlaps with the first Wi-Fi channel with a TBTT as a period. Taking 640 RSSIs collected in one TBTT as an example, in one TBTT, the time slot for the station device to scan a BLE channel is 160us (microseconds).

[0120] Exemplarily, the station device scans the BLE channel that overlaps with Wi-Fi channel 3, such as Fig.10As shown in (a), the station device scans BLE channel 5 in the first time slot, scans BLE channel 7 in the second time slot, scans BLE channel 10 in the third time slot, and scans BLE channel 13 in the fourth time slot. Then, it scans BLE channel 5 in the fifth time slot, and the scanning is cyclical until the BLE channel that overlaps with Wi-Fi channel 3 is cyclically scanned within a TBTT to obtain a first vector. Optionally, the station device scans BLE channel 5 in the first time slot, scans BLE channel 7 in the second time slot, scans BLE channel 10 in the third time slot, and scans BLE channel 13 in the fourth time slot. Then, it scans BLE channel 5 in the fifth time slot, and the scanning is cyclical until the BLE channel that overlaps with Wi-Fi channel 3 is cyclically scanned within a TBTT to obtain a first vector. Fig.10 The process shown in (a) in FIG. 1 scans Z cycles to obtain Z first vectors.

[0121] In another exemplary embodiment, the station device scans the BLE channel that overlaps with Wi-Fi channel 7, such as Fig.10 As shown in (b), the station device scans BLE channel 15 in the first time slot, scans BLE channel 16 in the second time slot, scans BLE channel 19 in the third time slot, scans BLE channel 22 in the fourth time slot, and scans BLE channel 25 in the fifth time slot. Then, it scans BLE channel 15 in the sixth time slot, and the scanning is cyclically performed until the BLE channel that overlaps with Wi-Fi channel 7 is cyclically scanned within a TBTT to obtain a first vector. Optionally, the station device scans BLE channel 15 in the first time slot, scans BLE channel 16 in the second time slot, scans BLE channel 19 in the third time slot, scans BLE channel 22 in the fourth time slot, and scans BLE channel 25 in the fifth time slot. Then, it scans BLE channel 15 in the sixth time slot, and the scanning is cyclically performed until the BLE channel that overlaps with Wi-Fi channel 7 is Fig.10 The process shown in (b) in FIG. 1 scans Z cycles to obtain Z first vectors.

[0122] In another exemplary embodiment, the station device scans the BLE channel that overlaps with the Wi-Fi channel 13, such as Fig.10 As shown in (c), the station device scans BLE channel 28 in the first time slot, scans BLE channel 31 in the second time slot, scans BLE channel 34 in the third time slot, and scans BLE channel 37 in the fourth time slot. Then, it scans BLE channel 28 in the fifth time slot, and the scanning is cyclically performed until the BLE channel that overlaps with Wi-Fi channel 13 is cyclically scanned within a TBTT to obtain a first vector. Optionally, the station device scans BLE channel 28 in the first time slot, scans BLE channel 31 in the second time slot, scans BLE channel 34 in the third time slot, and scans BLE channel 37 in the fourth time slot. Then, it scans BLE channel 28 in the fifth time slot, and the scanning is cyclically performed until the BLE channel that overlaps with Wi-Fi channel 13 is cyclically scanned within a TBTT to obtain a first vector. Fig.10 The process shown in (c) in FIG. 1 scans Z cycles to obtain Z first vectors.

[0123] It can be understood that each element in each of the above first vectors is used to indicate RSSI. Optionally, each of the first vectors includes 640 RSSI samples.

[0124] In the embodiment of the present application, for each of the M first Wi-Fi channels, based on Fig.11 In the process shown, the RSSI of the Wi-Fi signal in each first Wi-Fi channel is collected to obtain Z first vectors. That is, each first Wi-Fi channel corresponds to Z first vectors.

[0125] Optionally, for each first Wi-Fi channel among the M first Wi-Fi channels, the site device detects Z first vectors to determine whether the first Wi-Fi channel is in an idle state, and selects N first Wi-Fi channels in an idle state from the M first Wi-Fi channels.

[0126] Exemplarily, the station device may detect the Z first vectors by one or more of similarity detection, common segment number detection, and duty cycle detection. Optionally, the station device may simultaneously detect the similarity, common segment number, and duty cycle of the Z first vectors, thereby improving the detection accuracy and the accuracy of determining the idle Wi-Fi channel.

[0127] The following is an example of the specific implementation process of the site device detecting the similarity of Z first vectors, the number of common sections and the duty cycle. It should be understood that the formulas shown in the following embodiments are only some examples of this application and do not constitute a limitation of this application. As long as the scheme can perform similarity detection, common section number detection and duty cycle detection on Z first vectors, it should fall within the scope of protection of this application.

[0128] Method 1: Similarity Detection

[0129] It should be noted that, in a Wi-Fi channel, if an access point device periodically broadcasts a beacon frame, the Z first vectors will have a high degree of similarity with each other. Therefore, the first Wi-Fi channel in an idle state can be determined by detecting the similarity between the Z first vectors.

[0130] As an example, the site device may detect the similarity of the Z first vectors using a floating point representation. It should be noted that when the floating point representation is used to detect the vector similarity, the vector needs to be normalized.

[0131] Exemplarily, the similarity between every two first vectors can be calculated based on the following formula (1):

[0132]

[0133] Among them, in the above formula (1), sim(v i ,v j ) represents the vector v i and vector v j The similarity of corr(v i ,vj ) represents the vector v i and vector v j The correlation coefficient of ||v i ||2 represents the vector v i Modulus, ||v j ||2 represents the vector v j Find the model.

[0134] It can be seen that the above formula (1) involves the vector v i and vector v j To find the modulus, we need to take the square root. To simplify the calculation, we can first calculate the vector v i and vector v j Find the square.

[0135] Considering that if the vector v i and vector v j When both are 0 vectors, the vector v calculated by the above formula (1) is i and vector v j On the contrary, the two vectors are not very similar. In this case, the vector v i and vector v j The similarity is 0. Therefore, based on the above situation, the similarity between every two first vectors can also be calculated using the following formula (2).

[0136]

[0137] In the above formula (2), corr(v i ,v j ) represents the vector v i and vector v j The correlation coefficient of , T represents the matrix transformation, It means that first the vector v i Find the square and then find the modulus. It means that first the vector v j Find the square and then find the modulus; C is a positive number. Optionally, C can be preset without restriction.

[0138] It is understandable that the access point device will periodically broadcast beacon frames in the Wi-Fi channel. In some cases, when the Wi-Fi channel is busy, the beacon frames periodically broadcast by the access point device may be slightly delayed. For example, Fig.11 As shown, the access point device broadcasts beacon frames on the Wi-Fi channel at a beacon interval. For example, when the Wi-Fi channel is in a medium busy period, the time when the access point device broadcasts the beacon frame is slightly delayed relative to the duration of the beacon interval.

[0139] Based on the above situation, the similarity between every two first vectors can also be calculated based on the following formula (3):

[0140]

[0141] Among them, sim(v i ,v j )Δ represents the vector v based on the tolerance Δ i and vector v j similarity; Represents vector v i The vector obtained after right shift; the displacement δ is a set of integers from -Δ to Δ; Δ is a positive integer. Represents the vector v i The vector obtained after right shift is the same as the vector v j The calculated correlation coefficient takes the maximum value among 2Δ+1 calculation results.

[0142] Optionally, δ is an integer set from -3 to 3, that is, -3≤δ≤3. When -3≤δ≤-1, it indicates that the vector is shifted to the left; when 1≤δ≤3, it indicates that the vector is shifted to the right. When the vector is shifted to the left, it is necessary to add 0 to the right side of the elements included in the vector; when the vector is shifted to the right, it is necessary to add 0 to the left side of the elements included in the vector.

[0143] With vector v i =[1, 1, 1, 0, 0, 0], for example, when the vector v i When shifted right by two positions, that is, δ = 2, the vector after right shift is

[0144] It should be noted that the similarity between any two of the Z first vectors can be calculated using the above formula (1), formula (2) or formula (3). After calculating the similarity between any two first vectors, the similarity of the Z first vectors as a whole can be calculated based on the similarity between any two first vectors.

[0145] Exemplarily, the similarity of the Z first vectors as a whole can be calculated based on the following formula (4):

[0146]

[0147] Among them, sim{v i} Z Indicates the similarity of the Z first vectors as a whole; It represents the sum of the similarities between every two first vectors among the Z first vectors.

[0148] Alternatively, the similarity of the Z first vectors as a whole can also be calculated based on the following formula (5):

[0149]

[0150] Among them, sim{v i} Z Indicates the similarity of the Z first vectors as a whole; It represents the sum of similarities between two adjacent first vectors among the Z first vectors.

[0151] In the above embodiment, when the above formula (5) is used to calculate the similarity of the Z first vectors as a whole, since the similarities between two adjacent first vectors among the Z first vectors are summed, that is, only the similarity between two adjacent first vectors needs to be calculated, and there is no need to calculate the similarity between every two first vectors, thereby reducing the complexity of the calculation.

[0152] Optionally, in order to shorten the time for the site device to scan the Wi-Fi channel, the vector similarity can be calculated according to the above formula (1) to formula (5) by using a customized integrated circuit chip (application-specific integrated circuit, ASIC) or a micro control unit (micro controller unit, MCU).

[0153] As another example, the site device may calculate the vector similarity using a fixed-point representation. It should be noted that when calculating the vector similarity using a fixed-point representation, the vector may be binarized to map the values ​​of the elements of the vector to a sequence of [0, 1].

[0154] In the above manner, the first vector is first binarized, the dissimilarity between every two first vectors is calculated, and then the similarity is obtained by inversion. This simple operation can simplify the complexity of the calculation process, facilitate digital circuit implementation, and thus reduce design and power consumption costs.

[0155] Exemplarily, the dissimilarity between every two first vectors may be calculated based on the following formula (6):

[0156]

[0157] Among them, diff(v i ,v j ) represents the vector v i and vector v j The dissimilarity of ||v i -v j ||2 represents vector v i and vector v jThe L-2 norm of the absolute value of the difference between ||v i -v j ||1 represents vector v i and vector v j The value of the L-1 norm of the absolute value of the difference; Represents vector v i and vector v j The value of the XOR sum of each element of .

[0158] It can be seen from the above formula (6) that, for the binarized vectors, the value of the L-2 norm of the absolute value of the difference between the two vectors is the same as the value of the L-1 norm of the absolute value of the difference between the two vectors, and both are equal to the value of the XOR sum of the elements of the two vectors.

[0159] Optionally, considering that the Wi-Fi channel is in a busy period, the beacon frame periodically broadcast by the access point device may be slightly delayed. Therefore, the difference between each two first vectors may be calculated based on the tolerance Δ.

[0160] Exemplarily, the dissimilarity between every two first vectors may be calculated based on the following formula (7):

[0161]

[0162] Among them, diff Δ (v i ,v j ) represents the vector v based on the tolerance Δ i and vector v j The dissimilarity of Represents vector v i The vector obtained after right shift; the displacement δ is a set of integers from -Δ to Δ; Δ is a positive integer. Represents the vector v i The vector obtained after right shift is the same as the vector v j Sum the products of each element and take the minimum value among the 2Δ+1 calculated results.

[0163] It should be noted that, for the value of δ and the example of vector shift, reference may be made to the above embodiment, which will not be repeated here.

[0164] In addition, in the embodiment of the present application, the dissimilarity between any two first vectors in the Z first vectors can be calculated using the above formula (6) or formula (7). After calculating the dissimilarity between any two first vectors, the similarity of the Z first vectors as a whole can be calculated based on the dissimilarity between any two first vectors.

[0165] Optionally, the similarity of the Z first vectors as a whole can be calculated based on the following formula (8):

[0166]

[0167] Among them, sim{v i} Z Indicates the similarity of the Z first vectors as a whole; represents the sum of the dissimilarity between every two first vectors among the Z first vectors; L is the length of the first vector (or the number of elements in the first vector);

[0168] Alternatively, the similarity of the Z first vectors as a whole can also be calculated based on the following formula (9):

[0169]

[0170] Among them, sim{v i} Z Indicates the similarity of the Z first vectors as a whole; represents the sum of the dissimilarity between two adjacent first vectors among the Z first vectors; L is the length of the first vector (or the number of elements of the first vector);

[0171] In the above embodiment, when the above formula (9) is used to calculate the similarity of the Z first vectors as a whole, since the dissimilarity between two adjacent first vectors among the Z first vectors is summed, that is, only the dissimilarity between two adjacent first vectors needs to be calculated, and there is no need to calculate the dissimilarity between every two first vectors, thereby reducing the complexity of the calculation.

[0172] In some embodiments, for each of the M first Wi-Fi channels, the above formula may be used to calculate the similarity of the Z first vectors as a whole, thereby determining whether the first Wi-Fi channel is in an idle state based on the similarity of the Z first vectors as a whole.

[0173] Optionally, if the overall similarity of the Z first vectors is greater than or equal to a similarity threshold, it is determined that the first Wi-Fi channel is in an idle state. It should be noted that the similarity threshold can be set according to actual conditions and is not limited.

[0174] Method 2: Detection of the number of common sections

[0175] The number of common segments refers to the number of consecutive 1s in the logical sum of the binarization results of the elements corresponding to each first vector in the Z first vectors.

[0176] Taking the Z first vectors including: vector v1, vector v2 and vector v3 as an example, illustratively, Fig.12As shown, the logical sum of the binarization results of the second element corresponding to vector v1, vector v2 and vector v3 is 1, the logical sum of the binarization results of the fifth element corresponding to vector v1 is 1, and the logical sum of the binarization results of the sixth and seventh elements corresponding to vector v3 is 1. Therefore, the number of common segments of vector v1, vector v2 and vector v3 is 3.

[0177] It can be understood that when the binarization results of the corresponding elements of each first vector are all 1, the logical sum thereof is 1.

[0178] As an example, considering that the Wi-Fi channel is in a busy period, the beacon frame periodically broadcast by the access point device may be slightly delayed. Therefore, the first vector may be preprocessed first, and then the number of common segments of the Z first vectors may be calculated. The preprocessing includes shifting the elements of the first vector to the left and right.

[0179] Exemplarily, the displacement δ of the elements of the first vector to the left and right is an integer set from -Δ to Δ. Optionally, δ is an integer set from -2 to 2, that is, -2≤δ≤2. When the vector is shifted to the left, it is necessary to add 0 to the right side of the elements included in the vector; when the vector is shifted to the right, it is necessary to add 0 to the left side of the elements included in the vector.

[0180] Optionally, when the Z first vectors include two first vectors, both of the two first vectors may be preprocessed. When the Z first vectors include three or more first vectors, one of the three first vectors may be preprocessed, and the remaining two first vectors may not be processed.

[0181] For example, Fig.13 As shown, taking the vector v1 = [1, 1, 0, 1, 1, 1, 1, 0, 0] as an example, after shifting the vector v1 to the right by two bits (i.e., δ = 2), the resulting vector v1 = [0, 0, 1, 0, 1, 1, 1, 1, 1].

[0182] In some embodiments, for each of the M first Wi-Fi channels, the number of common segments of the Z first vectors may be detected in the above manner, thereby determining whether the first Wi-Fi channel is in an idle state based on the number of common segments of the Z first vectors.

[0183] Optionally, if the number of common segments of the Z first vectors is within a first preset range, it is determined that the first Wi-Fi channel is in an idle state. The first preset range may be set according to actual needs and is not limited. Exemplarily, the first preset range may be [1, 3].

[0184] It should be noted that if the number of common segments is greater, the corresponding Wi-Fi channel is busier; if the number of common segments is smaller, it means that the access point device has not broadcast a beacon frame in the corresponding Wi-Fi channel. Therefore, in the embodiment of the present application, considering noise interference, when the number of common segments of the Z first vectors is within [1, 3], it is determined that the corresponding first Wi-Fi channel is in an idle state.

[0185] Method 3: Duty cycle detection

[0186] The duty cycle is an important indicator for detecting whether a Wi-Fi channel is in an idle state and the degree to which a Wi-Fi channel is in a busy state. In the embodiment of the present application, the duty cycle includes a common section duty cycle and a non-common section duty cycle.

[0187] The public section duty cycle is used to determine whether the Wi-Fi channel is in an idle state, and the non-public section duty cycle is used to determine the degree to which the Wi-Fi channel is in a busy state.

[0188] Exemplarily, the common section duty cycle can also be understood as the duty cycle of the beacon frame, that is, the common section duty cycle can be calculated by detecting the duration of the beacon frame continuously broadcast by the access point device.

[0189] In some embodiments, by detecting the length of the common segment, it is determined whether an access point device continues to broadcast beacon frames. Exemplarily, the length of the common segment can be within a preset length range, and the number of common segments within the preset length range is greater than a threshold, indicating that the access point device continues to broadcast beacon frames.

[0190] The preset length range can be set according to actual needs and is not limited. For example, the preset length range is [4, 20] time slots.

[0191] Optionally, when the length of the common segment is [4, 20] time slots, and the number of common segments with a length of [4, 20] timeslots is greater than a threshold (e.g., 1), it indicates that an access point device continues to broadcast beacon frames. On this basis, the common segment duty cycle can be calculated. For example, the common segment duty cycle can be calculated based on the following formula (10):

[0192] Common section duty cycle = (duration of effective signal / period) × 100% (10)

[0193] The duration of the effective signal refers to the duration of the access point device continuously broadcasting the beacon frame, and the period is the time of one TBTT, for example, the period is 102.4 um.

[0194] Exemplarily, when the duty cycle of the common section is within the second preset range, it indicates that the corresponding first Wi-Fi channel is in an idle state.

[0195] Optionally, the non-common section duty cycle may be calculated by calculating the duty cycle of each first vector in the Z first vectors, and then taking the average value of the duty cycle of each first vector in the Z first vectors as the non-common section duty cycle.

[0196] Exemplarily, when the duty cycle of the non-public section is within a preset range, it means that the corresponding first Wi-Fi channel has an access point device and is in an idle state. Correspondingly, when the duty cycle of the non-public section is outside the preset range, it means that the corresponding first Wi-Fi channel has an access point device and is in a busy state.

[0197] The preset range can be set according to actual conditions and is not limited.

[0198] In an embodiment of the present application, the site device can determine whether the first Wi-Fi channel is in an idle state through three dimensions: similarity detection, common segment number detection, and duty cycle detection. Exemplarily, if the similarity of the Z first vectors is greater than or equal to the similarity threshold, the common segment number of the Z first vectors is within a first preset range, and the duty cycle of the Z first vectors is within a second preset range, then it is determined that the first Wi-Fi channel corresponding to the Z first vectors is in an idle state. This is conducive to improving the accuracy of determining that the Wi-Fi channel is in an idle state.

[0199] S303: The station device scans each second Wi-Fi channel of the N second Wi-Fi channels through Wi-Fi.

[0200] Optionally, the site device can determine whether the first Wi-Fi channel is in an idle state in the above manner, and then select N second Wi-Fi channels in an idle state from the M first Wi-Fi channels. Then, the site device scans the N second Wi-Fi channels through Wi-Fi, finds available access point devices, and establishes a communication connection with them.

[0201] Exemplarily, the site device may use an active scanning method or a passive scanning method to scan N second Wi-Fi channels through Wi-Fi. The active scanning method refers to the site device sending a detection frame on each second Wi-Fi channel in the N second Wi-Fi channels, and obtaining information about the access point device from the detection response frame replied by the access point device, thereby establishing a communication connection with the access point device.

[0202] The passive scanning mode refers to that the station device listens to the beacon frames periodically broadcast by the access point device, obtains the information of the access point device through the information contained in the beacon frame, and thus establishes a communication connection with the access point device.

[0203] In summary, using the solution of the present application, the site device performs a preamble scan through BLE, first selects M first Wi-Fi channels from all Wi-Fi channels, in which the sum of the RSSI of the Wi-Fi signals in the Wi-Fi channels is greater than a preset threshold, and then selects N second Wi-Fi channels in an idle state from the M first Wi-Fi channels. Finally, the site device scans the N second Wi-Fi channels through Wi-Fi in a targeted manner, finds available access point devices and establishes a communication connection with them. Compared with the site device scanning all Wi-Fi channels through Wi-Fi, the solution of the embodiment of the present application can effectively reduce power consumption, reduce communication delays, and improve the accuracy of Wi-Fi scanning.

[0204] It should be noted that the contents recorded in each embodiment of the present application can explain and illustrate the technical solutions in other embodiments of the present application, and the technical features recorded in each embodiment can also be applied in other embodiments and combined with the technical features in other embodiments to form a new solution. The present application only exemplarily lists several embodiments for illustration, and does not mean that the present application is limited to this.

[0205] An embodiment of the present application further provides a communication device, which includes a processor, and is used to implement the method in any of the above method embodiments.

[0206] Optionally, the communication device further includes a memory. The memory is used to store necessary program instructions and data, and the processor can call the program code and instructions stored in the memory to enable the communication device to execute the method in any of the above method embodiments. Of course, the memory may not be in the communication device.

[0207] Optionally, the communication device also includes an interface circuit, which is a code / data read / write interface circuit, and the interface circuit is used to receive computer execution instructions (computer execution instructions are stored in a memory, may be read directly from the memory, or may pass through other devices) and transmit them to the processor.

[0208] Optionally, the communication device further includes a communication interface, and the communication interface is used to communicate with a module outside the communication device.

[0209] It can be understood that the communication device can be a chip or a chip system. When the communication device is a chip system, it can be composed of chips, or it can include chips and other discrete devices. The embodiments of the present application do not specifically limit this.

[0210] The embodiment of the present application also provides an electronic device, which includes: a memory and one or more processors. The memory is used to store computer instructions, and when the electronic device is running, the processor executes the computer instructions in the memory to enable the electronic device to perform the functions or steps performed by the above-mentioned site device.

[0211] The present application also provides a chip system for use in a communication device. Fig.14 As shown, the chip system 1100 includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 may be Figure 2 The processor 101 is shown. The interface circuit 1102 may be, for example, an interface circuit between the processor 1101 and other devices (such as the transceiver 102).

[0212] The processor 1101 and the interface circuit 1102 may be interconnected via lines. For example, the interface circuit 1102 may be used to receive signals from other devices (e.g., the processor 1101). For another example, the interface circuit 1102 may be used to send signals to other devices (e.g., the processor 1101). Exemplarily, the interface circuit 1102 may read instructions stored in a memory and send the instructions to the processor 1101. When the instructions are executed by the processor 1101, the site device may perform the various functions or steps performed by the site device in the above-mentioned embodiment. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiments of the present application.

[0213] An embodiment of the present application further provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on a site device, the site device executes any one of the methods in the above method embodiments.

[0214] The embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute any one of the methods in the above method embodiments.

[0215] It should be noted that the terms "first" and "second" in the specification, claims and drawings of this application are used to distinguish different objects rather than to describe a specific order. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "multiple" means two or more.

[0216] In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0217] It should be understood that in the present application, "at least one (item)" refers to one or more. "Multiple" refers to two or more. "At least two (items)" refers to two or three and more than three. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple. “When” and “if” both mean that corresponding measures will be taken under certain objective circumstances. It does not limit the time, nor does it require any judgment when it is implemented, nor does it mean that there are other limitations.

[0218] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.

[0219] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules according to the system, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0220] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0221] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0222] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0223] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0224] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A wireless fidelity Wi-Fi scanning method, characterized in that: Applied to an electronic device, the electronic device supports at least two wireless access technologies, Bluetooth and Wi-Fi, and the method includes: Determine M first Wi-Fi channels through the Bluetooth; each of the M first Wi-Fi channels includes multiple Wi-Fi signals, and the sum of the wireless received signal strength RSSI of the multiple Wi-Fi signals is greater than a preset threshold; M≥1; Selecting N second Wi-Fi channels from the M first Wi-Fi channels through the Bluetooth; each of the N second Wi-Fi channels is in an idle state; wherein N≥1, and M≥N; Scan each second Wi-Fi channel of the N second Wi-Fi channels through the Wi-Fi.

2. The method according to claim 1, characterized in that The method further comprises: For each first Wi-Fi channel in the M first Wi-Fi channels, collect the RSSI of the Wi-Fi signal in the first Wi-Fi channel through the Bluetooth to obtain Z first vectors, where Z is a positive integer; The Z first vectors are detected to determine whether the first Wi-Fi channel is in an idle state.

3. The method according to claim 2, characterized in that Detecting the Z first vectors to determine whether the first Wi-Fi channel is in an idle state includes: Perform one or more of similarity detection, common segment number detection, and duty cycle detection on the Z first vectors to determine whether the first Wi-Fi channel is in an idle state; The common segment number is used to indicate the number of consecutive 1s of the logical sum of the binarization results of the elements corresponding to each first vector in the Z first vectors.

4. The method according to claim 3, characterized in that The first Wi-Fi channel being in an idle state includes: The similarity of the Z first vectors is greater than or equal to a similarity threshold, the number of common segments of the Z first vectors is within a first preset range, and the duty cycle of the Z first vectors is within a second preset range.

5. The method according to claim 3 or 4, characterized in that: The performing similarity detection on the Z first vectors includes: Using a floating point number representation method to detect the similarity of the Z first vectors; or using a fixed point number representation method to detect the similarity of the Z first vectors; Among them, the floating-point number representation method is used to indicate that the similarity of the Z first vectors is detected after the Z first vectors are normalized; the fixed-point number representation method is used to indicate that the similarity of the Z first vectors is detected after the Z first vectors are binarized.

6. The method according to claim 5, characterized in that The similarity of the Z first vectors is detected using floating point representation, including: Calculate the similarity between every two first vectors in the Z first vectors, and use the sum of the similarities between every two first vectors as the similarity of the Z first vectors; or, The similarity between two adjacent first vectors among the Z first vectors is calculated, and the sum of the similarities between the two adjacent first vectors is used as the similarity of the Z first vectors.

7. The method according to claim 5, characterized in that The similarity of the Z first vectors is detected using a fixed-point representation method, including: Calculate the dissimilarity between every two first vectors in the Z first vectors, and use the sum of the dissimilarity between every two first vectors as the similarity of the Z first vectors; or, The dissimilarity between two adjacent first vectors among the Z first vectors is calculated, and the sum of the dissimilarity between the two adjacent first vectors is used as the similarity of the Z first vectors.

8. The method according to any one of claims 2 to 7, characterized in that: The RSSI of the Wi-Fi signal in the first Wi-Fi channel is collected by the Bluetooth to obtain Z first vectors, including: By scanning a Bluetooth channel that overlaps with the first Wi-Fi channel through the Bluetooth, RSSI of the Wi-Fi signal in the first Wi-Fi channel is collected to obtain Z first vectors.

9. The method according to claim 8, characterized in that Scanning a Bluetooth channel that overlaps with the first Wi-Fi channel through the Bluetooth, collecting the RSSI of the Wi-Fi signal in the first Wi-Fi channel, and obtaining Z first vectors, including: The Bluetooth channel overlapping with the first Wi-Fi channel is cyclically scanned in each cycle of the Z cycles by the Bluetooth, and the RSSI of the Wi-Fi signal in the first Wi-Fi channel is collected to obtain Z first vectors.

10. The method according to claim 9, characterized in that The period is the target beacon transmission time TBTT.

11. The method according to any one of claims 1 to 10, characterized in that Determining M first Wi-Fi channels through Bluetooth includes: Scanning a Bluetooth channel of a first frequency band through the Bluetooth, collecting the RSSI of a Wi-Fi signal in a Wi-Fi channel of the first frequency band; The M first Wi-Fi channels are determined by detecting the RSSI of the Wi-Fi signal in the Wi-Fi channel of the first frequency band through the Bluetooth; wherein the Bluetooth channel of the first frequency band overlaps with the Wi-Fi channel of the first frequency band in the first frequency band.

12. The method according to any one of claims 1 to 11, characterized in that The electronic device includes a Wi-Fi module and a Bluetooth module; scanning each second Wi-Fi channel of the N second Wi-Fi channels by using the Wi-Fi module includes: The Wi-Fi module receives, through a processor, channel identifiers of the N second Wi-Fi channels from the Bluetooth module; The Wi-Fi module scans each second Wi-Fi channel of the N second Wi-Fi channels based on the channel identifiers of the N second Wi-Fi channels.

13. An electronic device, characterized in that: include: memory and one or more processors; The memory stores computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 12.

14. A communication device, characterized in that: The communication device comprises: a processor; the processor is configured to execute computer-executable instructions so that the communication device executes the method according to any one of claims 1 to 12.

15. A chip system, characterized in that: The chip system comprises: at least one processor and an interface; The interface is used to receive instructions and transmit the instructions to the at least one processor; the at least one processor executes the instructions so that the method according to any one of claims 1 to 12 is executed.

16. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the method according to any one of claims 1 to 12 to be executed.