Wireless communication anti-interference methods, electronic devices, chips and readable storage media

By dynamically selecting channels with positive benefits for switching, the performance degradation caused by channel interference in wireless communication is solved, thus improving the user experience.

CN115334602BActive Publication Date: 2026-05-26HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2021-05-11
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing wireless communication anti-interference solutions cannot effectively resist channel interference in complex scenarios, leading to a decline in communication performance and affecting user experience.

Method used

By obtaining channel scores from multiple channels, channels with positive benefits are dynamically selected for switching, avoiding the degradation of communication performance caused by channel switching and improving user experience.

Benefits of technology

It enables resistance to channel interference in complex scenarios, avoids communication performance degradation caused by channel switching, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115334602B_ABST
    Figure CN115334602B_ABST
Patent Text Reader

Abstract

This application provides a wireless communication anti-interference method, relating to the field of terminals. A second electronic device can obtain channel scores from multiple channels that can establish a wireless communication link with a first electronic device. Based on these channel scores, it can select a channel with positive benefit from the multiple channels, allowing the first and second electronic devices to switch from their current linked channel to a channel with positive benefit. This application also provides an electronic device, a chip, and a computer-readable storage medium. This application can dynamically change the communication channel between two linked electronic devices, resisting channel interference and enabling the electronic devices to switch to a channel with positive benefit for communication. This avoids communication performance degradation caused by channel switching and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a wireless communication anti-interference method, electronic device, chip, and computer-readable storage medium. Background Technology

[0002] Wireless communication applications are becoming increasingly widespread. For example, Wi-Fi applications are no longer limited to connections between routers and Wi-Fi devices; peer-to-peer Wi-Fi communication scenarios, such as screen mirroring and Wi-Fi Direct, are also emerging. When users communicate using Wi-Fi devices, they may face significant interference. High levels of interference can lead to significant air interface latency and reduced speeds, thereby affecting the smoothness of applications running on the Wi-Fi device and impacting the user experience.

[0003] Existing anti-interference solutions generally include physical layer anti-interference schemes and automatic channel selection schemes, which can resist interference to a certain extent. However, as Wi-Fi application scenarios become increasingly complex, existing anti-interference schemes can no longer completely guarantee against interference in certain complex scenarios. For example, when a user equipment (UE) is connected to an access point (AP), the UE may also be using screen mirroring with a tablet. In this scenario, the channel used by the UE and the AP is the same as the channel used by the UE and the tablet for screen mirroring. When the channel is interfered with, it is impossible to change the channel at any time. Even if it is possible to change the channel between the UE and the tablet, performance may be degraded, and not all application scenarios will yield positive benefits. Summary of the Invention

[0004] In view of this, it is necessary to provide a wireless communication anti-interference method that can overcome the above problems and avoid communication performance degradation caused by channel switching.

[0005] The first aspect of this application discloses a wireless communication anti-interference method, comprising: a second electronic device acquiring channel scores of multiple channels capable of establishing a wireless communication link with a first electronic device, and selecting a channel with positive benefit from the multiple channels based on the channel scores; the second electronic device sending a first channel switching frame to the first electronic device, causing the first electronic device to switch from the first channel to the channel with positive benefit, wherein the first channel is the channel currently used by the first electronic device and the second electronic device to establish a wireless communication link; and when the second electronic device receives an acknowledgment character transmitted by the first electronic device, the second electronic device switches from the first channel to the channel with positive benefit.

[0006] By adopting this technical solution, the communication channel between two electronic devices that establish a connection can be dynamically changed. This can resist channel interference, allowing the electronic devices to switch to a channel with positive benefits for communication. It can avoid the degradation of communication performance caused by channel switching and improve the user experience.

[0007] In one possible implementation, the second electronic device acquires channel scores for multiple channels that can establish wireless communication links with the first electronic device, including: the second electronic device performs a channel switch every first preset time interval to listen to each of the multiple channels for a second preset time interval to obtain channel parameters for each channel; the second electronic device performs a channel score for each channel based on the channel parameters of each channel.

[0008] By adopting this technical solution, the second electronic device can switch to other channels every first preset time to listen for channel parameters and score each channel based on the channel parameters of each channel.

[0009] In one possible implementation, the channel parameters include the channel duty cycle and the Received Signal Strength Indicator (RSSI). Each channel is scored based on its channel parameters, including: a second electronic device calculating the channel rate for each channel at a second preset time based on the channel duty cycle and RSSI of each of the multiple channels; the second electronic device filtering the channel rate of each channel at the second preset time using a preset filtering algorithm to obtain the channel rate of each channel; and the second electronic device scoring each channel based on its channel rate. The channel rate and channel score are positively correlated.

[0010] By adopting this technical solution, the second electronic device can calculate the channel rate at the second preset time based on the channel duty cycle and the channel RSSI, and perform channel scoring based on the filtered channel rate.

[0011] In one possible implementation, the second electronic device acquires channel scores for multiple channels that can establish a wireless communication link with the first electronic device, including: the second electronic device receiving the channel score for each channel transmitted by the first electronic device.

[0012] By adopting this technical solution, the second electronic device can select channels with positive benefits from each channel by receiving the channel score of each channel transmitted by the first electronic device.

[0013] In one possible implementation, the second electronic device acquires channel scores for multiple channels that can establish a wireless communication link with the first electronic device, including: the second electronic device switching channels once every first preset time interval to listen to each of the multiple channels for a second preset time interval to obtain channel parameters for each channel; the second electronic device obtaining a first score result for each channel based on the channel parameters of each channel; the second electronic device receiving a second score result for each channel transmitted by the first electronic device; and the second electronic device obtaining a channel score for each channel based on the first score result and the second score result.

[0014] By adopting this technical solution, the second electronic device can select a channel with positive benefits from multiple channels based on its own channel scoring results and the channel scoring results of the first electronic device.

[0015] In one possible implementation, selecting a channel with positive benefit from multiple channels based on channel score includes: a second electronic device selecting the channel with the highest channel score from multiple channels as the channel with positive benefit.

[0016] By adopting this technical solution, the second electronic device can use the channel with the highest channel score as the channel with positive benefits.

[0017] In one possible implementation, selecting a channel with positive benefit from multiple channels based on a channel score includes: when the second electronic device detects that the air interface delay of the first channel is greater than or equal to a preset threshold, the second electronic device selects a channel with positive benefit from multiple channels based on the channel score.

[0018] By adopting this technical solution, when the second electronic device detects channel interference, it can initiate a channel switching process and select a channel with positive benefits from multiple channels based on the channel score to perform channel switching.

[0019] In one possible implementation, the second electronic device includes a listening state and an operating state. The second electronic device sends a first channel switching frame to the first electronic device, including: when the second electronic device detects that the air interface delay of the first channel reaches a preset threshold in the operating state, the second electronic device calculates the channel switching time based on the time node when the current air interface delay reaches the preset threshold and the time node when it enters the listening state again; when the second electronic device determines that the channel switching time meets a preset conflict requirement, the second electronic device sends the first channel switching frame to the first electronic device; wherein, the preset conflict requirement includes that the channel switching time is less than a third preset time.

[0020] In one possible implementation, the channel with positive benefit is selected from multiple channels based on the channel score, including: when the second electronic device is in a preset service scenario, the second electronic device selects the channel with positive benefit from multiple channels based on the channel score.

[0021] By adopting this technical solution, when the second electronic device is in a preset service scenario, the second electronic device can initiate a channel switching process and select a channel with positive benefits from multiple channels based on the channel score to perform channel switching.

[0022] In one possible implementation, the wireless communication anti-interference method further includes: when the second electronic device ends a preset service scenario, the second electronic device sends a second channel switching frame to the first electronic device, so that the first electronic device switches back from the channel with positive benefits to the first channel; when the second electronic device receives the confirmation character transmitted by the first electronic device again, the second electronic device switches back from the channel with positive benefits to the first channel.

[0023] By adopting this technical solution, when the preset service scenario ends, the first electronic device and the second electronic device can switch back to the original channel to communicate.

[0024] In one possible implementation, the first electronic device is a Group Client (GC) device, and the second electronic device is a Group Owner (GO) device.

[0025] In one possible implementation, the second electronic device establishes a wireless communication link with the first electronic device and the third electronic device on the first channel. The wireless communication anti-interference method further includes: the second electronic device sending a first channel switching frame to the third electronic device, so that the third electronic device switches from the first channel to a channel with positive benefits.

[0026] By adopting this technical solution, the communication channel between the three electronic devices in the chain can be dynamically changed, which can resist channel interference and enable the electronic devices to switch to a channel with positive benefits for communication. This can avoid the degradation of communication performance caused by channel switching and improve the user experience.

[0027] In one possible implementation, when the second electronic device receives an acknowledgment character transmitted by the first electronic device, the second electronic device switches from the first channel to a channel with positive benefits, including: when the second electronic device receives an acknowledgment character transmitted by the first electronic device or the third electronic device, the second electronic device switches from the first channel to a channel with positive benefits.

[0028] By adopting this technical solution, channel switching can be performed when the second electronic device receives an acknowledgment character transmitted by the first or third electronic device.

[0029] Secondly, embodiments of this application provide a wireless communication anti-interference method, comprising: a first electronic device acquiring channel scores of multiple channels capable of establishing a wireless communication link with a second electronic device; the first electronic device sending the channel scores of the multiple channels to the second electronic device, so that the second electronic device selects a channel with positive benefit from the multiple channels based on the channel scores; when the first electronic device receives a channel switching frame sent by the second electronic device, the first electronic device sends an acknowledgment character to the second electronic device; the first electronic device switches from a first channel to a channel with positive benefit; wherein, the first channel is the channel currently used by the first electronic device and the second electronic device to establish a wireless communication link.

[0030] By adopting this technical solution, the communication channel between two electronic devices that establish a connection can be dynamically changed. This can resist channel interference, allowing the electronic devices to switch to a channel with positive benefits for communication. It can avoid the degradation of communication performance caused by channel switching and improve the user experience.

[0031] In one possible implementation, the first electronic device acquires channel scores for multiple channels that can establish a wireless communication link with the second electronic device, including: the first electronic device performs a channel switch every first preset time interval to listen to each of the multiple channels for a second preset time interval to obtain channel parameters for each channel; the first electronic device performs a channel score for each channel based on the channel parameters of each channel.

[0032] By adopting this technical solution, the first electronic device can switch to other channels every first preset time to listen for channel parameters and score each channel based on the channel parameters of each channel.

[0033] In one possible implementation, the channel parameters include the channel duty cycle and the channel RSSI. Each channel is scored based on its channel parameters, including: a first electronic device calculating the channel rate of each channel at a second preset time based on the channel duty cycle and the channel RSSI of each of the multiple channels; the first electronic device filtering the channel rate of each channel at the second preset time using a preset filtering algorithm to obtain the channel rate of each channel; and the first electronic device scoring each channel based on its channel rate. The channel rate and channel score are positively correlated.

[0034] By adopting this technical solution, the first electronic device can calculate the channel rate at the second preset time based on the channel duty cycle and the channel RSSI, and perform channel scoring based on the filtered channel rate.

[0035] In one possible implementation, the second electronic device establishes a wireless communication link with the first electronic device and the third electronic device on the first channel. The wireless communication anti-interference method further includes: when the first electronic device does not receive the channel switching frame sent by the second electronic device and the third electronic device receives the channel switching frame sent by the second electronic device, the first electronic device switches from the first channel to the channel with the highest channel score after the communication link with the second electronic device is disconnected for a preset time.

[0036] By adopting this technical solution, in a multi-device link establishment scenario, when the first electronic device does not receive the channel switching frame sent by the second electronic device but the third electronic device receives the channel switching frame sent by the second electronic device, the first electronic device can take remedial measures to switch from the first channel to the channel with the highest channel score, so that the first to third electronic devices can switch to the channel with positive benefits for communication.

[0037] In one possible implementation, the first electronic device is a Group Client (GC) device, and the second electronic device is a Group Owner (GO) device.

[0038] Thirdly, embodiments of this application provide a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the wireless communication anti-interference method as described in the first or second aspect.

[0039] Fourthly, embodiments of this application provide an electronic device, which includes a processor and a memory. The memory is used to store instructions, and the processor is used to call the instructions in the memory, causing the electronic device to perform the wireless communication anti-interference method as described in the first or second aspect.

[0040] Fifthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform the wireless communication anti-interference method as described in the first or second aspect.

[0041] In a sixth aspect, embodiments of this application provide a chip coupled to a memory in an electronic device, the chip being used to control the electronic device to perform the wireless communication anti-interference method as described in the first or second aspect.

[0042] It is understood that the computer-readable storage medium described in the third aspect, the electronic device described in the fourth aspect, the computer program product described in the fifth aspect, and the chip described in the sixth aspect all correspond to the methods described in the first or second aspects above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Attached Figure Description

[0043] Figure 1 This is a schematic diagram illustrating an application scenario of the wireless communication anti-interference method provided in an embodiment of this application;

[0044] Figure 2 A flowchart illustrating a wireless communication anti-interference method provided in an embodiment of this application;

[0045] Figure 3 A flowchart illustrating a wireless communication anti-interference method provided in another embodiment of this application;

[0046] Figure 4 This is a schematic diagram illustrating an application scenario of a wireless communication anti-interference method provided in another embodiment of this application.

[0047] Figure 5 A flowchart illustrating a wireless communication anti-interference method provided in another embodiment of this application;

[0048] Figure 6a This is a schematic diagram illustrating the state switching of a Non-master device according to an embodiment of this application;

[0049] Figure 6b This is a schematic diagram of the state switching of a Master device provided in an embodiment of this application;

[0050] Figure 7 A schematic diagram illustrating the process of channel switching performed by a first electronic device, a second electronic device, and a fourth electronic device according to an embodiment of this application;

[0051] Figure 8 A timing diagram illustrating the channel switching process of a first electronic device, a second electronic device, and a fourth electronic device provided in an embodiment of this application;

[0052] Figure 9 This is a schematic diagram of the structure of a possible first electronic device provided in an embodiment of this application;

[0053] Figure 10 This is a schematic diagram of the structure of a possible second electronic device provided in an embodiment of this application. Detailed Implementation

[0054] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.

[0055] Reference Figure 1 The diagram shown illustrates an application environment for a wireless communication anti-interference method provided in this embodiment. This embodiment can be applied to a first electronic device 100 and a second electronic device 200. The first electronic device 100 and the second electronic device 200 can be the same electronic device or different electronic devices. For example, the first electronic device 100 can be a mobile phone, tablet computer, laptop computer, smart TV, etc. The second electronic device 200 can be a mobile phone, tablet computer, laptop computer, smart TV, etc. Figure 1 In this example, we will use a mobile phone as the first electronic device 100 and a tablet computer as the second electronic device 200 for illustration.

[0056] For example, access point 300 is a wireless router. First electronic device 100 establishes a link with access point 300, meaning first electronic device 100 accesses the Wi-Fi network. First electronic device 100 also establishes a link with second electronic device 200, such as through Wi-Fi Direct, wireless screen mirroring, or data sharing (e.g., Huawei Share). First electronic device 100, second electronic device 200, and access point 300 are in a co-frequency, co-channel environment. When first electronic device 100 and second electronic device 200 link, a Master election can be performed to determine one as the Group Owner (GO) device and the other as the Group Client (GC) device. GC devices can connect to GO devices like access points (APs). GO and GC devices can be in a one-to-one or one-to-many relationship. A GO device can provide services to several GC devices like an AP, and a GO device can also connect to an AP. The Master election rule can be an existing rule, such as electing the device with more battery power as the Master (GO device) and the device with less battery power as the Non-master (GC device).

[0057] In some embodiments, the first electronic device 100 and the second electronic device 200 may be connected to the same Wi-Fi network, or the first electronic device 100 and the second electronic device 200 may be connected to different Wi-Fi networks.

[0058] Taking a mobile phone as the first electronic device 100 and a tablet computer as the second electronic device 200 as an example, the second electronic device 200 has a larger battery capacity than the first electronic device 100. After a Master election between the two devices, the first electronic device 100 becomes the GC device, and the second electronic device 200 becomes the GO device. The second electronic device 200 can function as an AP and can connect to one or more GC devices. The channels selectable by the first electronic device 100 and the access point 300 include channels 36, 149, and 157, etc.

[0059] Assume that the channel between the first electronic device 100 and the access point 300 is channel 149, and the channel between the first electronic device 100 and the second electronic device 200 is also channel 149. The first electronic device 100 connects to a wireless router for internet access, and simultaneously connects to the second electronic device 200 via Wi-Fi Direct, projecting desktop content onto the screen of the second electronic device 200 via Wi-Fi Direct. When interference exists on channel 149 (such as adjacent channel interference or co-channel interference), for example, if this interference is caused by a third electronic device 400 (such as another wireless router or electronic device), since the access point 300's channel is preset by the user, the access point 300 cannot automatically change the channel. Even if the first electronic device 100 senses the interference, the channel between the first electronic device 100 and the access point 300 will not change. Regarding the channel between the first electronic device 100 and the second electronic device 200, when the first electronic device 100 and / or the second electronic device 200 sense the interference, without degrading the data communication performance, the first electronic device 100 and the second electronic device 200 can switch to other channels with less or no interference. For example, if channel 36 is interference-free, the first electronic device 100 and the second electronic device 200 can switch to channel 36 for communication.

[0060] For example, the interference intensity of channel 149 is -53dBm. By conducting BE stream TCP packet dumping tests at different bandwidths (20M, 40M, 80M), the channel rate between the first electronic device 100 and the second electronic device 200 can be obtained, as shown in Table 1 below:

[0061] Table 1

[0062] 20M 40M 80M Switch to channel 36 225Mbps 449Mbps 902Mbps Maintain on channel 149 70Mbps 60Mbps 258Mbps

[0063] As shown in Table 1 above, when channel interference is detected, the channel rate is significantly improved after the first electronic device 100 and the second electronic device 200 perform channel switching, compared with staying in the original channel.

[0064] Reference Figure 2 The diagram shown is a flowchart illustrating a wireless communication anti-interference method provided in an embodiment of this application. The first electronic device 100 and the second electronic device 200 can communicate on multiple channels. Assuming that initially, the first electronic device 100 communicates with the access point 300 on the first channel among multiple channels, and both the first electronic device 100 and the second electronic device 200 communicate on the first channel, the first electronic device 100 and the second electronic device 200 have unequal roles; for example, the first electronic device 100 is a GC device and the second electronic device 200 is a GO device. In this embodiment, the wireless communication anti-interference method can be applied to the second electronic device 200, and the wireless communication anti-interference method may include:

[0065] Step 21: The second electronic device 200 performs channel switching and listens to the channel parameters of each channel.

[0066] In some embodiments, the second electronic device 200 can switch to other channels every first preset time interval to listen for a second preset time interval. The first and second preset times can be set according to actual needs, for example, the first preset time is 3 seconds and the second preset time is 15 milliseconds. The second electronic device 200 switches to other channels every 3 seconds to perform a 15-millisecond channel scan, thereby enabling the monitoring of the channel parameters of each channel. The channel parameters may include the channel duty cycle, Received Signal Strength Indicator (RSSI), etc.

[0067] Step 22: The second electronic device 200 scores each channel based on the channel parameters of each channel.

[0068] In some embodiments, the second electronic device 200 can calculate the channel rate of a channel based on the channel parameters of that channel, and then score the channel based on the channel rate. For example, for channel CH1 among multiple channels, the second electronic device 200 calculates the current 15ms channel rate using a 15ms channel duty cycle and RSSI, and then applies a 1 / 4 alpha filter to the current 15ms channel rate to obtain the channel rate of channel CH1. That is, the channel rate of channel CH1 can be calculated using the following formula: V = 1 / 4 * V i-1 +3 / 4V iWhere V is the channel rate of channel CH1, V i V is the current channel rate for channel CH1 over the next 15 ms. i-1 The channel rate is the rate of the previous 15ms listening session for channel CH1. The second electronic device 200 can score each channel using a preset scoring rule. This preset scoring rule may include: a higher channel rate results in a higher score from the second electronic device 200 for that channel; or a better Quality of Experience (QoE) at that channel rate results in a higher score from the second electronic device 200 for that channel. For example, the score can be obtained by performing an operation (multiplication or division) on the channel rate and a preset coefficient, or by inputting the channel rate into a preset formula.

[0069] In some embodiments, the second electronic device 200 may also employ other forms of filtering methods to obtain the channel rate of channel CH1. For example, the channel rate of channel CH1 may be obtained by performing 1 / 2 alpha filtering or 3 / 4 alpha filtering on the current 15ms channel rate.

[0070] In some embodiments, existing channel rate calculation methods can be used to calculate the channel rate for the current 15ms. For example, the channel rate of the RSSI under interference-free conditions can be measured, and then the rate can be converted based on the channel duty cycle to obtain the channel rate corresponding to the RSSI at that channel duty cycle. If the channel rate of the RSSI under interference-free conditions is V1 and the channel duty cycle is 50%, the second electronic device 200 can calculate the channel rate for the current 15ms as 0.5*V1.

[0071] Step 23: The second electronic device 200 selects a channel with positive benefit from multiple channels to perform channel switching.

[0072] In some embodiments, when the second electronic device 200 is in a preset service scenario, the second electronic device 200 can select a channel with positive benefits from multiple channels to perform channel switching. The preset service scenario can be set according to actual needs. For example, the preset service scenario may include the second electronic device 200 currently running a low-latency service (video content casting, game screen casting, etc.), or the second electronic device 200 transferring files with the first electronic device 100.

[0073] In some embodiments, positive gain may refer to the second electronic device 200 receiving power from the current channel CH. i Switch to another channel CH j Afterwards, the delay is compared to the current channel CH. i Lower speed, or faster data transmission, and faster than the current channel CH.i The data transmission rate is higher, while the negative benefits are the opposite. If the second electronic device 200 is moved from the current channel CH... i Switch to another channel CH j If this results in a negative return, then the second electronic device 200 will not use the current channel CH. i Switch to channel CH j .

[0074] In some embodiments, the second electronic device 200 receives data from the current channel CH. i Switch to another channel CH j During file transfer, after the file transfer is completed, the second electronic device 200 can switch back to the original channel, that is, the second electronic device 200 switches from channel CH. j Switch back to channel CH i .

[0075] In some embodiments, when the second electronic device 200 detects channel interference on the current channel, it can select a channel with positive benefit from a plurality of channels to perform channel switching. For example, the second electronic device 200 can perform air interface delay detection (the air interface delay between the second electronic device 20 and the first electronic device 100 during communication on the current channel) to determine whether channel interference exists on the current channel. If the air interface delay is greater than a preset time, the second electronic device 200 can determine that channel interference exists on the current channel.

[0076] In some embodiments, channels with a channel score greater than the current channel score can be identified as channels with positive benefits. The second electronic device 200 can select a channel with positive benefits from channels with higher channel scores than the current channel score. When multiple channels with positive benefits exist, the second electronic device 200 can select the channel with the highest channel score as the target channel and perform channel switching. In other embodiments, when multiple channels with positive benefits exist, the second electronic device 200 can also randomly select one channel as the target channel and perform channel switching.

[0077] For example, when the second electronic device 200 is on the current channel CH i When channel interference is detected, channel CH j The channel with the highest score, selected by the second electronic device 200 from multiple channels, is channel CH, which has a positive return. j The second electronic device 200 sends channel switching information to the first electronic device 100. Upon receiving this channel switching information, the first electronic device 100 can send an acknowledgment character (ACK) message to the second electronic device 200. Upon receiving the ACK message, the second electronic device 200 can switch from the current channel CH...i Switch to channel CH j .

[0078] For example, the channel through which the second electronic device 200 establishes a link with the first electronic device 100 is CH. i Channel CH j The highest score was achieved by the first electronic device 100 and the second electronic device 200 from the current channel CH. i Switch to channel CH j File transfer is performed. For high-speed but jittery channels, after the file transfer is completed, the second electronic device 200 can also send a channel switching message to the first electronic device 100, so that the first electronic device 100 can switch channels from CH. j Switch back to channel CH i When the first electronic device 100 receives the channel switching information, it can send an ACK message to the second electronic device 200. Upon receiving the ACK message, the second electronic device 200 can then switch channels from channel CH... j Switch back to channel CH i .

[0079] like Figure 3 The diagram shown is a flowchart illustrating a wireless communication anti-interference method provided in an embodiment of this application. A first electronic device 100 and a second electronic device 200 can communicate on multiple channels. Initially, the first electronic device 100 communicates with the access point 300 on the first channel among the multiple channels. Both the first electronic device 100 and the second electronic device 200 communicate on the first channel. Taking the first electronic device 100 as a GC device and the second electronic device 200 as a GO device as an example, in this embodiment, the wireless communication anti-interference method can be applied to the first electronic device 100. The wireless communication anti-interference method may include:

[0080] Step 31: The first electronic device 100 performs channel switching and listens to the channel parameters of each channel.

[0081] In some embodiments, the first electronic device 100 can switch to other channels every first preset time interval to listen for a second preset time interval. The first and second preset times can be set according to actual needs, for example, the first preset time is 3 seconds and the second preset time is 15 milliseconds. The first electronic device 100 performs a channel scan for 15 milliseconds every 3 seconds to obtain the channel parameters of a channel. The channel parameters may include the channel duty cycle, Received Signal Strength Indicator (RSSI), etc. For example, the first electronic device 100 can perform a channel scan for 15 milliseconds on each channel in the channel list according to the country code every 3 seconds to obtain the channel parameters of each channel.

[0082] Step 32: The first electronic device 100 scores each channel based on the channel parameters of each channel.

[0083] In some embodiments, the first electronic device 100 can calculate the channel rate of a channel based on the channel parameters of that channel, and then score the channel based on the channel rate. For example, for channel CH1 among multiple channels, the first electronic device 100 calculates the channel rate of channel CH1 in the current 15ms using a 15ms channel duty cycle and RSSI, and then performs a 1 / 4 alpha filter on the current 15ms channel rate to obtain the channel rate of channel CH1.

[0084] In some embodiments, the first electronic device 100 may also employ other forms of filtering methods to obtain the channel rate of channel CH1. For example, the channel rate of channel CH1 may be obtained by performing 1 / 2 alpha filtering or 3 / 4 alpha filtering on the current 15ms channel rate.

[0085] Step 33: The first electronic device 100 transmits the scoring results of multiple channels to the second electronic device 200, so that the second electronic device 200 selects the channel with positive benefit from the multiple channels.

[0086] In some embodiments, when the first electronic device 100 obtains the scoring results of each channel, the first electronic device 100 can summarize the scoring results of each channel and transmit them to the second electronic device 200, so that the second electronic device 200 can select the channel with positive benefit from multiple channels based on the channel scoring results, thereby realizing channel switching.

[0087] In some embodiments, the second electronic device 200 may perform channel scoring on each channel itself, or it may not perform channel scoring, that is, it may only receive the channel scoring results sent by the first electronic device 100.

[0088] Step 34: The first electronic device 100 receives the channel switching information transmitted by the second electronic device 200, and performs channel switching based on the channel switching information.

[0089] In some embodiments, when the second electronic device 200 selects a target channel (such as channel CH) from a plurality of channels j When the first electronic device 100 is in a channel switching state, the second electronic device 200 can transmit channel switching information to the first electronic device 100. The channel switching information may include a channel switching action frame. The first electronic device 100 can respond to the channel switching information and perform a channel switch.

[0090] In some embodiments, when the first electronic device 100 receives the channel switching information, it can send ACK information to the second electronic device 200. When the second electronic device 200 receives the ACK information, it can perform channel switching, thereby enabling both the first electronic device 100 and the second electronic device 200 to switch to the same channel again for communication.

[0091] Reference Figure 4 The diagram shown illustrates an application environment for a wireless communication anti-interference method provided in this embodiment. This embodiment can be applied to a first electronic device 100, a second electronic device 200, and a fourth electronic device 500. The first electronic device 100, the second electronic device 200, and the fourth electronic device 500 can be the same electronic device or different electronic devices. For example, the first electronic device 100 can be a mobile phone, tablet computer, laptop computer, smart TV, etc. The second electronic device 200 can be a mobile phone, tablet computer, laptop computer, smart TV, etc. The fourth electronic device 500 can be a mobile phone, tablet computer, laptop computer, smart TV, etc. Figure 4 In this example, we will use the first electronic device 100 as a mobile phone, the second electronic device 200 as a tablet computer, and the fourth electronic device 500 as a mobile phone for illustration.

[0092] For example, the first electronic device 100, the second electronic device 200, and the fourth electronic device 500 all establish links with access point 300, meaning they all access the same Wi-Fi network. The first electronic device 100 also establishes a link with the second electronic device 200, and the fourth electronic device 500 establishes a link with the second electronic device 200. For instance, the first electronic device 100 can project its screen to the second electronic device 200 via multi-screen collaboration, and the fourth electronic device 500 can project its screen to the second electronic device 200 wirelessly. The first electronic device 100, the second electronic device 200, and the fourth electronic device 500 form a multi-screen-to-one projection scenario.

[0093] In some embodiments, the first electronic device 100, the second electronic device 200, and the fourth electronic device 500 may not be connected to the same Wi-Fi network.

[0094] The second electronic device 200 has more battery power than the first electronic device 100 and the fourth electronic device 500. After a Master election among the devices, the first electronic device 100 and the fourth electronic device 500 become GC devices, and the second electronic device 200 becomes a GO device. For example, the first electronic device 100, the second electronic device 200, and the fourth electronic device 500 are all connected to access point 300 via channel 36. The first electronic device 100 and the second electronic device 200 communicate via channel 36 for multi-screen collaboration, and the fourth electronic device 500 communicates via channel 36 for wireless screen projection with the second electronic device 200.

[0095] During operation, the second electronic device 200, the first electronic device 100, and the fourth electronic device 500 can perform interference detection. When interference is detected, without degrading data communication performance, the first electronic device 100, the fourth electronic device 500, and the second electronic device 200 can switch to other channels with positive benefits. For example, if channel 44 has positive benefits, the first electronic device 100 and the second electronic device 200 can switch to channel 44 to communicate, and the fourth electronic device 500 can also switch to channel 44 to communicate with the second electronic device 200.

[0096] For example, the second electronic device 200 calculates the channel switching benefit and selects a channel with a positive benefit from multiple channels to perform the channel switching. The second electronic device 200 can send an Action frame to the first electronic device 100 and the fourth electronic device 500, thereby enabling the first electronic device 100 and the fourth electronic device 500 to perform channel switching. The second electronic device 200 can also perform channel switching upon receiving ACK information transmitted by the first electronic device 100 and / or the fourth electronic device 500.

[0097] Reference Figure 5 The diagram shown is a flowchart illustrating a wireless communication anti-interference method provided in an embodiment of this application. The first electronic device 100 and the fourth electronic device 500 can communicate with the second electronic device 200 on multiple channels. The first electronic device 100 and the fourth electronic device 500 are GC devices, and the second electronic device 200 is a GO device. In this embodiment, the wireless communication anti-interference method may include:

[0098] Step 51: The first electronic device 100 establishes a link with the second electronic device 200. The first electronic device 100 performs channel scanning and scores each channel based on the channel scanning results.

[0099] In some embodiments, for example, the first electronic device 100, the second electronic device 200, and the fourth electronic device 500 are all connected to the access point 300 via channel 36, and the first electronic device 100 and the second electronic device 200 establish a link on channel 36. When the first electronic device 100 establishes a link with the second electronic device 200, the first electronic device 100 can perform a full channel scan, listen to the channel parameters of each channel, and then score each channel based on the channel parameters. For example, when the first electronic device 100 establishes a link with the second electronic device 200, the first electronic device 100 can scan each channel for a certain period of time according to the channel list under the country code to obtain the channel parameters, score the channel based on the channel parameters of each channel, and store the channel scoring results in the channel list.

[0100] For example, the Wi-Fi 20MHz band includes channels 36, 40, 44, 48, 149, 153, 157, 161, and 165. The first electronic device 100 can perform a full channel scan and channel scoring to obtain the scoring results for channels 36, 40, 44, 48, 149, 153, 157, 161, and 165.

[0101] In some embodiments, after the first electronic device 100 and the second electronic device 200 establish a link, the first electronic device 100 may also perform a channel scan every first preset time interval. For example, the first electronic device 100 may perform a 15ms channel scan on a channel every 3s until the channel parameters of each channel are detected. The first electronic device 100 can calculate the channel rate of each channel based on the channel parameters, and then score each channel based on the channel rate. The first electronic device 100 may update the existing channel scores in the channel list based on the current channel scoring results.

[0102] Step 52: The fourth electronic device 500 establishes a link with the second electronic device 200, and the fourth electronic device 500 performs channel scanning and scores each channel based on the channel scanning results.

[0103] In some embodiments, the fourth electronic device 500 and the second electronic device 200 establish a link on channel 36. When the fourth electronic device 500 and the second electronic device 200 establish a link, the fourth electronic device 500 can perform a full channel scan to listen to the channel parameters of each channel, and then score each channel based on the channel parameters of each channel.

[0104] In some embodiments, after the fourth electronic device 500 establishes a link with the second electronic device 200, the fourth electronic device 500 may also perform a channel scan every first preset time interval. For example, the fourth electronic device 500 may perform a 15ms channel scan on a channel every 3s until the channel parameters of each channel are detected. The fourth electronic device 500 may update the existing channel scores in the channel list based on the current channel scoring results.

[0105] Step 53: The second electronic device 200 receives the channel scoring results transmitted by the first electronic device 100 and the channel scoring results transmitted by the fourth electronic device 500.

[0106] In some embodiments, when the first electronic device 100 completes a full-channel scoring, it can transmit the channel scoring result to the second electronic device 200. When the fourth electronic device 500 completes a full-channel scoring, it can transmit the channel scoring result to the second electronic device 200. For example, the first electronic device 100 and the fourth electronic device 500 can send a QoE Action frame to the second electronic device 200, which contains the channel scoring result. The second electronic device 200 can summarize the channel scoring results transmitted by the first electronic device 100 and the fourth electronic device 500 to obtain the final scoring result (e.g., Radio Resource Management List, RRMList) for each channel. The RRMList summarized by the second electronic device 200 can be sent back to the first electronic device 100 and the fourth electronic device 500. For example, the second electronic device 200 can perform an average calculation on the channel scoring results transmitted by the first electronic device 100 and the fourth electronic device 500 to obtain the final scoring result for each channel. For example, the first electronic device 100 performs an average calculation on the channel scoring results transmitted by the first electronic device 100 and the fourth electronic device 500 for each channel. i The score was 7 points, and the fourth electronic device had 500 pairs of channel CH. i The score is 7.2, so the second electronic device 200 can obtain channel CH. i The final score was 7.1.

[0107] In some embodiments, the second electronic device 200 may also perform full-channel scanning and scoring. In this case, the second electronic device 200 can summarize its own channel scoring results, the channel scoring results transmitted by the first electronic device 100, and the channel scoring results transmitted by the fourth electronic device 500 to obtain the final scoring result for each channel.

[0108] Step 54: When the second electronic device 200 detects channel interference in the current channel, it selects a channel with positive benefits from multiple channels.

[0109] In some embodiments, assuming the current channel is channel 36, when the second electronic device 200 detects channel interference on channel 36, the first electronic device 100 can select a channel with positive gain from the channel list to perform channel switching. For example, the second electronic device 200 can select a channel with positive gain from channels with scores higher than channel 36. When multiple channels with positive gain exist, the second electronic device 200 can select the channel with the highest channel score as the target channel to perform channel switching.

[0110] In some embodiments, when there are multiple channels with positive returns, the second electronic device 200 may also randomly select one of them as the target channel to perform channel switching.

[0111] Step 55: The second electronic device 200 transmits channel switching information to the first electronic device 100 and the fourth electronic device 500.

[0112] In some embodiments, for example, the second electronic device 200 selects channel 44, which has positive benefits, from a plurality of channels. The second electronic device 200 may transmit channel switching information to the first electronic device 100 and the fourth electronic device 500 to notify the first electronic device 100 and the fourth electronic device 500 to switch from channel 36 to channel 44.

[0113] Step 56: The first electronic device 100 receives the channel switching information transmitted by the second electronic device 200, and performs channel switching based on the channel switching information.

[0114] Step 57: The fourth electronic device 500 receives the channel switching information transmitted by the second electronic device 200, and performs channel switching based on the channel switching information.

[0115] In some embodiments, when the first electronic device 100 receives channel switching information transmitted by the second electronic device 200, the first electronic device 100 may switch from channel 36 to channel 44 in response to the channel switching information. When the fourth electronic device 500 receives channel switching information transmitted by the second electronic device 200, the fourth electronic device 500 may switch from channel 36 to channel 44 in response to the channel switching information.

[0116] In some embodiments, when the first electronic device 100 receives channel switching information transmitted by the second electronic device 200, it sends back ACK information to the second electronic device 200. When the fourth electronic device 500 receives channel switching information transmitted by the second electronic device 200, it sends back ACK information to the second electronic device 200.

[0117] Step 58: When the second electronic device 200 receives the ACK information transmitted by the first electronic device 100 and / or the fourth electronic device 500, it performs a channel switch.

[0118] In some embodiments, when the second electronic device 200 receives ACK information transmitted by the first electronic device 100 and / or the fourth electronic device 500, the second electronic device 200 performs a channel switch, switching from channel 36 to channel 44.

[0119] like Figure 6a As shown, for example, the first electronic device 100 and the fourth electronic device 500 are non-master devices (GC devices). Both the first electronic device 100 and the fourth electronic device 500 can include five states: initial state, linked state, synchronization state, listening state, and working state. Figure 6b As shown, the second electronic device 200 is a Master device (GO device). The second electronic device 200 can include four states: initial state, linked state, listening state, and working state. The initial state indicates that the electronic device has not yet established a link with other electronic devices. The linked state indicates that the electronic device has established a link with other electronic devices. The synchronization state indicates that the electronic device is synchronizing its time with the Master device with which it has established a link. The listening state indicates that the electronic device has switched to a public channel to listen to data sent by the electronic devices with which it has established a link. The working state indicates that the electronic device is performing channel scanning or interference detection to initiate channel switching. When the Non-master device executes the channel switching process, after going through the initial state, linked state, and synchronization state, it will transition between the listening state and the working state. When the Master device executes the channel switching process, after going through the initial state and linked state, it will also transition between the listening state and the working state, so as to quickly switch to a less congested channel when channel interference is detected.

[0120] refer to Figure 7 The diagram illustrates the process of channel switching performed by the first electronic device 100, the second electronic device 200, and the fourth electronic device 500 according to an embodiment of this application. The explanation is based on an example where the first electronic device 100 and the second electronic device 200 initially communicate on channel 36, the fourth electronic device 500 and the second electronic device 200 initially communicate on channel 36, and the first electronic device 100, the second electronic device 200, and the fourth electronic device 500 switch from channel 36 to channel 44, which offers positive benefits.

[0121] Step 71: When the second electronic device 200 detects that the air interface delay reaches a preset threshold, the second electronic device 200 calculates the channel switching time.

[0122] In some embodiments, when the second electronic device 200 detects that the air interface delay for data communication with the first electronic device 100 or the fourth electronic device 500 reaches (greater than or equal to) a preset threshold, the second electronic device 200 can determine that channel 36 is subject to channel interference. Assuming that channel 44 is a channel with positive benefit selected by the second electronic device 200, after determining the channel with positive benefit, the second electronic device 200 can perform channel switching time calculation.

[0123] In some embodiments, the second electronic device 200 detects air interface delay in the working state. The channel switching time can refer to the time between the time node when the second electronic device 200 detects that the air interface delay has reached a preset threshold and the time node when it enters the listening state again.

[0124] Step 72: When the second electronic device 200 determines that the channel switching time meets the preset conflict requirements, it sends an interference switching action frame to the first electronic device 100 and the fourth electronic device 500.

[0125] In some embodiments, the preset conflict requirement can be set according to actual needs. For example, the preset conflict requirement is that the channel switching time is greater than 10ms. That is, when the second electronic device 200 detects that the time node from which the air interface delay reaches the preset threshold is greater than 10ms from the time of the next entry into the listening state, the second electronic device 200 sends an interference switching action frame to the first electronic device 100 and the fourth electronic device 500; when the second electronic device 200 detects that the time node from which the air interface delay reaches the preset threshold is less than or equal to 10ms from the time of the next entry into the listening state, the second electronic device 200 does not send an interference switching action frame to the first electronic device 100 and the fourth electronic device 500. When the second electronic device 200 determines that the channel switching time does not meet the preset conflict requirement, it can jump to step 71.

[0126] Step 73: When the second electronic device 200 determines that the channel switching conditions meet the preset conditions, the second electronic device 200 performs channel switching, switching from channel 36 to channel 44.

[0127] In some embodiments, both the first electronic device 100 and the fourth electronic device 500 send back ACK information to the second electronic device 200 when they receive an interference handover action frame. This preset condition may refer to the second electronic device 200 receiving ACK information from the first electronic device 100 and / or the fourth electronic device 500. When the second electronic device 200 determines that the channel handover condition does not meet the preset condition, it can proceed to step 71. That is, when the second electronic device 200 does not receive ACK information, it will not perform channel handover.

[0128] 74. When the first electronic device 100 or the fourth electronic device 500 receives an interference switching action frame, the first electronic device 100 or the fourth electronic device 500 performs a channel switch, switching from channel 36 to channel 44.

[0129] In some embodiments, when the first electronic device 100 receives an interference switching action frame, the first electronic device 100 performs a channel switch, switching from channel 36 to channel 44. When the fourth electronic device 500 receives an interference switching action frame, the fourth electronic device 500 performs a channel switch, switching from channel 36 to channel 44.

[0130] In some embodiments, when the first electronic device 100 or the fourth electronic device 500 does not receive an interference handover action frame, the first electronic device 100 or the fourth electronic device 500 may attempt channel handover remedy. Channel handover remedy typically occurs when the first electronic device 100 receives an interference handover action frame, but the fourth electronic device 500 does not, or vice versa. In the case where neither the first electronic device 100 nor the fourth electronic device 500 receives an interference handover action frame, the second electronic device 200 will not perform channel handover because it cannot receive ACK information, making channel handover remedy by the first electronic device 100 and / or the fourth electronic device 500 meaningless.

[0131] In some embodiments, the positive benefit channel selected by the second electronic device 200 is the channel with the highest channel score. If the first electronic device 100 receives an interference handover action frame but the fourth electronic device 500 does not, the fourth electronic device 500 may automatically switch to the channel with the highest channel score after a preset time period of disconnection between the channel communication with the second electronic device 200, in order to communicate with the second electronic device 200. If the first electronic device 100 does not receive an interference handover action frame but the fourth electronic device 500 receives one, the first electronic device 100 may automatically switch to the channel with the highest channel score after a preset time period of disconnection between the channel communication with the second electronic device 200, in order to communicate with the second electronic device 200.

[0132] In some embodiments, the first electronic device 100, the second electronic device 200, and the fourth electronic device 500 operate on a common channel in a listening state, and this common channel can be pre-designated. If the first electronic device 100 receives an interference switching action frame, but the fourth electronic device 500 does not, resulting in a break in channel communication with the second electronic device 200, the fourth electronic device 500 can also receive a broadcast message from the second electronic device 200 in the listening state to re-establish a communication link with the second electronic device 200. This broadcast information may include the channel information of the second electronic device 200 in its operating state, and the fourth electronic device 500 can perform channel switching based on this broadcast information.

[0133] refer to Figure 8 This is a timing diagram illustrating the channel switching process of the first electronic device 100, the second electronic device 200, and the fourth electronic device 500 provided in this application embodiment. Assuming the first electronic device 100 is a mobile phone, the second electronic device 200 is a tablet computer, and the fourth electronic device 500 is a mobile phone, the explanation will take the example of the first electronic device 100 casting its screen to the second electronic device 200 via multi-screen collaboration, and the fourth electronic device 500 casting its screen to the second electronic device 200 via wireless screen casting.

[0134] The second electronic device 200 establishes a link with the first electronic device 100:

[0135] The second electronic device 200 initiates a multi-screen collaboration application and sends a first Bluetooth Low Energy (BLE) broadcast to the first electronic device 100. The first electronic device 100 may display a pop-up window allowing the user to confirm whether to connect the first electronic device 100 to the second electronic device 200. When the connection is confirmed, the first electronic device 100 sends a second BLE broadcast to the second electronic device 200. The second electronic device 200 may then display a pop-up window allowing the user to confirm whether to allow the first electronic device 100 to connect to the second electronic device 200.

[0136] When permission to connect the first electronic device 100 to the second electronic device 200 is confirmed, the second electronic device 200 creates a first Virtual Access Point (VAP) and sends a third BLE broadcast to the first electronic device 100. The first electronic device 100 can respond to the received third BLE broadcast and create a second VAP. After the first and second VAPs are activated, both the first electronic device 100 and the second electronic device 200 exist in the Master role and are in their initial state.

[0137] When the second electronic device 200 establishes a link with the first electronic device 100, the states of the second electronic device 200 and the first electronic device 100 change to a linked state. During link establishment, the second electronic device 200 and the first electronic device 100 can perform coarse-grained time synchronization, such as second-level time synchronization. Each of the first electronic device 100 and the second electronic device 200 sends Beacon frames at its own Target Beacon Transmission Time (TBTT) period. These Beacon frames carry Group Info IE and a timestamp. The Group Info IE contains Master Metric information. This Master Metric information is used to determine which of the two linked electronic devices plays the Master role and which plays the Non-Master role.

[0138] When the second electronic device 200 receives a Beacon frame from the first electronic device 100, it can parse the Master Metric in the Group Info IE. After comparing it with its own Master Metric, the second electronic device 200 can determine that it should continue to exist as the Master device (GO device). When the first electronic device 100 receives a Beacon frame from the second electronic device 200, it can parse the Master Metric in the Group Info IE. After comparing it with its own Master Metric, the first electronic device 100 can determine that it should exist as a Non-master device (GC device), and its role changes to Non-master. The first electronic device 100 can synchronize with the time of the second electronic device 200 based on the timestamp carried in the received Beacon frame (e.g., millisecond-level time synchronization). At this time, the state of the first electronic device 100 can switch from linked state to synchronized state.

[0139] Similarly, the wireless screen mirroring application can trigger the fourth electronic device 500 to create a third VAP. After the third VAP is activated, the fourth electronic device 500 exists as the Master and is in its initial state. When the second electronic device 200 establishes a link with the fourth electronic device 500, the state of the fourth electronic device 500 changes to the linked state. The fourth electronic device 500 and the second electronic device 200 can perform coarse-grained time synchronization during link establishment, such as second-level time synchronization. The second electronic device 200 and the fourth electronic device 500 each send Beacon frames according to their own TBTT cycle.

[0140] When the second electronic device 200 receives a Beacon frame from the fourth electronic device 500, it can parse the Master Metric in the Group Info IE. After comparing it with its own Master Metric, the second electronic device 200 can determine that it should continue to exist as the Master device. When the fourth electronic device 500 receives a Beacon frame from the second electronic device 200, it can parse the Master Metric in the Group Info IE. After comparing it with its own Master Metric, the fourth electronic device 500 can determine that it should exist as a Non-master device, and its role changes to Non-master. The fourth electronic device 500 can synchronize with the time of the second electronic device 200 based on the timestamp carried in the received Beacon frame (e.g., millisecond-level time synchronization). At this time, the state of the fourth electronic device 500 can switch from linked state to synchronized state.

[0141] like Figure 8 As shown, when the Master device (second electronic device 200) experiences a TBTT interrupt, the Master device can start a timer with a preset time (e.g., 24ms) when each TBTT interrupt occurs. The preset time can be set according to actual needs and is not limited here. After synchronizing with the Master device, the Non-master devices (first electronic device 100 and fourth electronic device 500) can calculate the time when the Master device will experience the next TBTT interrupt based on the time difference between themselves and the Master device, and enable a scheduling timer to simulate the Master device's TBTT interrupt. The expiration time of this scheduling timer is the same as the TBTT interrupt occurrence time of the Master device. When this scheduling timer expires, a timer with a preset time (24ms) can also be started.

[0142] Figure 8The timing diagram shown illustrates a two-to-one scenario. When the Master device establishes links with two Non-master devices, it can set the Master channel field in the Beacon frame to 1 after the third TBTT interrupt. The Master device's state switches from linked to listening, and a preset timer (24ms) is started. Upon receiving the Beacon frame from the Master device, the Non-master device can parse that the Master channel field in the Beacon frame is 1. After the Master device's Listen timer expires and the Non-master device's scheduling timer expires, because the Master channel field is 1, both the Master and Non-master devices can switch to active status and perform channel scanning, i.e., as shown below. Figure 8 As shown, the Master device and Non-master device can switch their state to the active state after the fourth TBTT interrupt. The first channel scan can occur 100ms after the device switches to the active state, and thereafter a channel scan can be performed every 3s. In other embodiments, for a one-to-one connection scenario, the two link-establishing electronic devices can also use similar timing to achieve channel switching. The timing diagram for the one-to-one connection scenario can be found in... Figure 8 The timing diagram is obtained by appropriately deforming it (the timing diagrams of the first electronic device 100 and the second electronic device 200 are appropriately deformed).

[0143] In some embodiments, the Master device receives each TBTT interrupt (i.e., after the Master channel is assigned a value of 1) after the Master channel is set to 1. Figure 8 Starting from the 4th TBTT interrupt, each TBTT interrupt can trigger a listener state, allowing the non-master device to start a Listen timer with a preset duration (24ms). Upon expiration of the timer, if the Master channel field in the Beacon frame is found to be 1, the non-master device can enter a listener state and start the Listen timer with a preset duration (24ms). In listener state, the non-master device can encapsulate and send QoE Action frames to the Master device, and can parse the Group Info IE and RRM List from the Beacon frames sent by the Master device. Figure 8 As shown, a non-master device can enter a listening state during the fifth TBTT interrupt.

[0144] In some embodiments, when both non-master devices complete synchronization before the fourth TBTT interrupt, the non-master device may also enter the listening state at the fourth TBTT interrupt.

[0145] In listening mode, the Master device can periodically send Beacon frames to the Non-master devices and receive QoE Action frames sent by the Non-master devices. The Master device can parse the QoE Action frames to summarize the scores of each channel from the various Non-master devices and update the RRM List. The QoE Action frames can include the scoring results for each channel.

[0146] When the preset Listen timer (24ms) expires, both the Master device and the Non-master device can switch to the working state. In the working state, the Non-master device can perform channel scanning and channel scoring at a period of 3 seconds; in the working state, the Master device can perform interference detection based on the air interface delay of data frame transmission. When interference is detected, the Master device initiates the channel switching process.

[0147] refer to Figure 9 This is a schematic diagram of the hardware structure of the first electronic device 100 provided in an embodiment of this application. Figure 9 As shown, the first electronic device 100 may include a first screen 1001, a first processor 1002, a first memory 1003, and a first communication bus 1004. The first memory 1003 stores one or more first computer programs 1005. The one or more first computer programs 1005 are configured to be executed by the first processor 1002. The one or more first computer programs 1005 include instructions that can be used to perform actions such as... in the first electronic device 100. Figure 3 The aforementioned wireless communication anti-interference method.

[0148] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the first electronic device 100. In other embodiments, the first electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. For example, the first electronic device 100 may also include a camera.

[0149] refer to Figure 10 This is a schematic diagram of the hardware structure of the second electronic device 200 provided in an embodiment of this application. Figure 10As shown, the second electronic device 200 may include a second screen 2001, a second processor 2002, a second memory 2003, and a second communication bus 2004. The second memory 2003 stores one or more second computer programs 2005. The one or more second computer programs 2005 are configured to be executed by the second processor 2002. The one or more second computer programs 2005 include instructions that can be used to implement actions such as... in the second electronic device 200. Figure 2 The aforementioned wireless communication anti-interference method.

[0150] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the second electronic device 200. In other embodiments, the second electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. For example, the second electronic device 200 may also include a camera.

[0151] Both the first processor 1002 and the second processor 2002 may include one or more processing units. For example, the first processor 1002 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0152] Both the first processor 1002 and the second processor 2002 may also include a memory for storing instructions and data. In some embodiments, the memory in the first processor 1002 and the second processor 2002 is a cache memory. This memory can store instructions or data that the first processor 1002 (second processor 2002) has just used or is repeatedly used. If the first processor 1002 (second processor 2002) needs to use the instruction or data again, it can directly retrieve it from this memory. This avoids repeated accesses, reduces the waiting time of the first processor 1002 (second processor 2002), and thus improves the efficiency of the system.

[0153] In some embodiments, both the first processor 1002 and the second processor 2002 may include one or more interfaces. Interfaces may include inter-integrated circuit (I2C) interfaces, inter-integrated circuit sound (I2S) interfaces, pulse code modulation (PCM) interfaces, universal asynchronous receiver / transmitter (UART) interfaces, mobile industry processor interfaces (MIPI), general-purpose input / output (GPIO) interfaces, SIM interfaces, and / or USB interfaces, etc.

[0154] In some embodiments, both the first memory 1003 and the second memory area 2006 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0155] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the wireless communication anti-interference method in the above embodiment.

[0156] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the wireless communication anti-interference method in the above embodiment.

[0157] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the wireless communication anti-interference method in the above-described method embodiments.

[0158] In this embodiment, the first electronic device, the second electronic device, the computer storage medium, the computer program product, or the chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0159] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, 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.

[0160] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are illustrative. For instance, the division of modules or units is a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0161] The unit described as a separate component may or may not be physically separate. The component shown as a unit can be one physical unit or multiple physical units, that is, it can be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of the solution in this embodiment according to actual needs.

[0162] Furthermore, the functional units in the various embodiments of this 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 integrated unit can be implemented in hardware or as a software functional unit.

[0163] If the integrated unit is implemented as 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 solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0164] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.

Claims

1. A wireless communication anti-interference method, characterized in that, include: The second electronic device acquires channel scores of multiple channels that can establish wireless communication links with the first electronic device, and selects a channel with positive benefit from the multiple channels based on the channel scores. The second electronic device also establishes a wireless communication link with an access point (AP). The first electronic device is a Group Client (GC) device and the second electronic device is a Group Owner (GO) device. The second electronic device sends a first channel switching frame to the first electronic device, so that the first electronic device switches from the first channel to the channel with positive benefit, wherein the first channel is the channel used by the first electronic device and the second electronic device to currently establish a wireless communication link, and the channel used by the AP and the second electronic device to currently establish a wireless communication link; When the second electronic device receives the acknowledgment character transmitted by the first electronic device, the second electronic device switches from the first channel to the channel with positive gain. In the case where the second electronic device establishes a wireless communication link with the first electronic device through the channel with positive gain, the second electronic device and the AP still maintain the established wireless communication link through the first channel.

2. The wireless communication anti-interference method as described in claim 1, characterized in that, The second electronic device acquires channel scores for multiple channels that can establish wireless communication links with the first electronic device, including: The second electronic device performs a channel switch every first preset time interval to listen to each of the plurality of channels for a second preset time interval, thereby obtaining the channel parameters of each channel. The second electronic device performs a channel score on each channel based on the channel parameters of each channel.

3. The wireless communication anti-interference method as described in claim 2, characterized in that, The channel parameters include the channel duty cycle and the received signal strength index (RSSI). The process of scoring each channel based on its parameters includes: The second electronic device calculates the channel rate of each channel at the second preset time based on the channel duty cycle and channel RSSI of each of the plurality of channels; The second electronic device filters the channel rate of each channel at the second preset time based on a preset filtering algorithm to obtain the channel rate of each channel; The second electronic device performs channel scoring on each channel based on the channel rate of each channel; The channel rate is positively correlated with the channel score.

4. The wireless communication anti-interference method as described in claim 1, characterized in that, The second electronic device acquires channel scores for multiple channels that can establish wireless communication links with the first electronic device, including: The second electronic device receives the channel scores of the plurality of channels transmitted by the first electronic device.

5. The wireless communication anti-interference method as described in claim 1, characterized in that, The second electronic device acquires channel scores for multiple channels that can establish wireless communication links with the first electronic device, including: The second electronic device performs a channel switch every first preset time interval to listen to each of the plurality of channels for a second preset time interval, thereby obtaining the channel parameters of each channel. The second electronic device obtains a first score result for each channel based on the channel parameters of each channel; The second electronic device receives the second scoring result for each channel transmitted by the first electronic device; The second electronic device obtains a channel score for each channel based on the first scoring result and the second scoring result.

6. The wireless communication anti-interference method according to any one of claims 1 to 5, characterized in that, The step of selecting a channel with positive returns from the plurality of channels based on the channel score includes: The second electronic device selects the channel with the highest channel score from the plurality of channels as the channel with positive benefit.

7. The wireless communication anti-interference method according to any one of claims 1 to 5, characterized in that, The step of selecting a channel with positive returns from the plurality of channels based on the channel score includes: When the second electronic device detects that the air interface delay of the first channel is greater than or equal to a preset threshold, the second electronic device selects a channel with positive benefit from the plurality of channels according to the channel score.

8. The wireless communication anti-interference method as described in claim 7, characterized in that, The second electronic device includes a listening state and an operating state. The second electronic device sends a first channel switching frame to the first electronic device, including: When the second electronic device detects that the air interface delay of the first channel reaches the preset threshold in the working state, the second electronic device calculates the channel switching time based on the time node when the air interface delay reaches the preset threshold and the time node when it enters the monitoring state again. When the second electronic device determines that the channel switching time meets the preset conflict requirement, the second electronic device sends the first channel switching frame to the first electronic device; The preset conflict requirement includes that the channel switching time be less than a third preset time.

9. The wireless communication anti-interference method according to any one of claims 1 to 5, characterized in that, The step of selecting a channel with positive returns from the plurality of channels based on the channel score includes: When the second electronic device is in a preset service scenario, the second electronic device selects a channel with positive benefits from the plurality of channels based on the channel score.

10. The wireless communication anti-interference method as described in claim 9, characterized in that, Also includes: When the second electronic device ends the preset service scenario, the second electronic device sends a second channel switching frame to the first electronic device, so that the first electronic device switches back from the channel with positive benefits to the first channel; When the second electronic device receives the confirmation character transmitted by the first electronic device again, the second electronic device switches back from the channel with positive benefit to the first channel.

11. The wireless communication anti-interference method according to any one of claims 1 to 5, characterized in that, The second electronic device establishes a wireless communication link with both the first and third electronic devices on the first channel, and the wireless communication anti-interference method further includes: The second electronic device sends the first channel switching frame to the third electronic device, so that the third electronic device switches from the first channel to the channel with positive benefit.

12. The wireless communication anti-interference method as described in claim 11, characterized in that, When the second electronic device receives an acknowledgment character transmitted by the first electronic device, the second electronic device switches from the first channel to the channel with positive returns, including: When the second electronic device receives an acknowledgment character transmitted by the first electronic device or the third electronic device, the second electronic device switches from the first channel to the channel with positive benefits.

13. A wireless communication anti-interference method, characterized in that, include: The first electronic device acquires channel scores for multiple channels that can establish wireless communication links with the second electronic device, wherein the second electronic device also establishes a wireless communication link with an access point (AP), the first electronic device is a Group Client (GC) device, and the second electronic device is a Group Owner (GO) device; The first electronic device sends the channel scores of the plurality of channels to the second electronic device, so that the second electronic device selects a channel with positive benefit from the plurality of channels based on the channel scores; When the first electronic device receives a channel switching frame sent by the second electronic device, the first electronic device sends an acknowledgment character to the second electronic device; The first electronic device switches from the first channel to the channel with positive benefits; Wherein, the first channel is the channel used by the first electronic device and the second electronic device to currently establish a wireless communication link, and the channel used by the AP and the second electronic device to currently establish a wireless communication link. In the case where the second electronic device establishes a wireless communication link with the first electronic device through the channel with positive benefits, the second electronic device and the AP still maintain the established wireless communication link through the first channel.

14. The wireless communication anti-interference method as described in claim 13, characterized in that, The first electronic device acquires channel scores for multiple channels that can establish wireless communication links with the second electronic device, including: The first electronic device performs a channel switch every first preset time interval to listen to each of the plurality of channels for a second preset time interval, thereby obtaining the channel parameters of each channel. The first electronic device performs a channel score on each channel based on the channel parameters of each channel.

15. The wireless communication anti-interference method as described in claim 14, characterized in that, The channel parameters include the channel duty cycle and the received signal strength index (RSSI). The process of scoring each channel based on its parameters includes: The first electronic device calculates the channel rate of each channel at the second preset time based on the channel duty cycle and channel RSSI of each of the plurality of channels; The first electronic device filters the channel rate of each channel at the second preset time based on a preset filtering algorithm to obtain the channel rate of each channel; The first electronic device performs channel scoring on each channel based on the channel rate of each channel; The channel rate is positively correlated with the channel score.

16. The wireless communication anti-interference method as described in claim 13, characterized in that, The second electronic device establishes a wireless communication link with both the first and third electronic devices on the first channel, and the wireless communication anti-interference method further includes: When the first electronic device does not receive the channel switching frame sent by the second electronic device and the third electronic device receives the channel switching frame sent by the second electronic device, the first electronic device switches from the first channel to the channel with the highest channel score after the communication link with the second electronic device is disconnected for a preset time.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the wireless communication anti-interference method as described in any one of claims 1 to 16.

18. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store instructions, and the processor being used to invoke the instructions in the memory to cause the electronic device to execute the wireless communication anti-interference method according to any one of claims 1 to 16.

19. A chip coupled to a memory in an electronic device, characterized in that, The chip is used to control the electronic device to perform the wireless communication anti-interference method according to any one of claims 1 to 16.