Channel scanning method and device, electronic equipment and storage medium

By using slave nodes to perform channel scanning and return results in a network structure of one master and multiple slaves, the problem of channel scanning when the master device is busy is solved, and the function of adaptive channel switching is realized.

CN119697653APending Publication Date: 2025-03-25GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311242305.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In a network structure with one master and multiple slaves, the master device interrupts the original communication when performing channel scanning, and cannot perform channel scanning when the master device is busy, resulting in channel evaluation and handover failure.

Method used

When the master device cannot perform channel scanning, the slave node performs channel scanning and returns the results to the master device to complete channel evaluation and handover.

Benefits of technology

When the master device is busy or unable to perform channel scanning, the slave node assists in completing channel scanning and evaluation to ensure the normal operation of the adaptive channel switching function in the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697653A_ABST
    Figure CN119697653A_ABST
Patent Text Reader

Abstract

The invention relates to a channel scanning method and device, electronic equipment, a computer readable storage medium and a computer program product. The channel scanning method in some embodiments comprises the following steps: determining whether a slave node needs to participate in channel scanning or not; under the condition that it is determined that the slave nodes need to participate in channel scanning, target slave nodes participating in channel scanning are determined; sending channel scanning notification information to the target slave node, wherein the channel scanning notification information is used for indicating the target slave node to perform channel scanning; and obtaining a channel scanning result returned by the target slave node, and performing channel evaluation based on the channel scanning result. Based on the scheme of the embodiment of the invention, the adaptive channel scanning process in a network architecture with one master and multiple slaves can be met, and adaptive channel evaluation and channel switching can be completed on the basis of the adaptive channel scanning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a channel scanning method, a channel scanning device, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the development of communication technology, a network structure with one master and multiple slaves has emerged. Taking the video screen transmission field in the whole machine WIFI application as an example, the screen transmitter is used as STA (station), multiple STAs are connected to the whole machine AP (node), and AP is used as the central device to connect multiple slave devices STA. Taking the audio transmission field in the whole machine WIFI application as an example, multiple array microphones are used as STAs and connected to the AP that specifically receives audio at the whole machine end. For example, the network structure composed of GO (central device, equivalent to AP) and GC (slave device, equivalent to STA) in the WiFi P2P mode is also a network structure with one master and multiple slaves.

[0003] In these one-master-multiple-slave network structures, there is usually an adaptive channel switching function. That is, the master device, as the central device, obtains the key channel parameters in the environmental channel, evaluates the channel with the least interference, and then notifies the slave device to synchronously switch to the optimal channel. In this adaptive channel switching function, when the master device is scanning the channel, it will interrupt the original communication, because there are multiple WiFi (Wireless Fidelity, a technology that connects terminals to each other wirelessly), such as 2.4G bands have 1, 2, 3..., 13, 5G bands have 36, 40, 44...60, 64, 149, 153, 157, 161, 165, etc. When scanning the channel, the master device needs to poll and switch to different available channels, collect channel parameters of different channels, and then evaluate the channel. Generally, channel scanning will take a certain amount of time, such as 5 to 10 seconds, depending on the number of scanned channels and the scanning time of each channel. However, in an actual working process, there may be a situation where the master device cannot perform channel scanning, resulting in the master device being unable to perform channel scanning and evaluation. Summary of the invention

[0004] Based on this, it is necessary to provide a channel scanning method, a channel scanning device, an electronic device, and a computer-readable storage medium to address the above technical problems.

[0005] In a first aspect, the present application provides a channel scanning method, the method comprising:

[0006] Determine whether the slave node needs to participate in channel scanning;

[0007] In the case where it is determined that the slave node needs to participate in the channel scanning, determining a target slave node to participate in the channel scanning;

[0008] Sending channel scanning notification information to the target slave node, wherein the channel scanning notification information is used to instruct the target slave node to perform channel scanning;

[0009] A channel scanning result returned by the target slave node is obtained, and a channel assessment is performed based on the channel scanning result.

[0010] Based on the channel scanning method provided in the embodiment of the present application, when the master node needs the slave node to participate in the channel scanning, after determining the target slave node participating in the channel scanning, the master node sends a channel scanning notification information to the target slave node, thereby instructing the target slave node to perform channel scanning, and after obtaining the channel scanning result returned by the target slave node, performs channel evaluation based on the channel scanning result returned by the target slave node, so that when the master device is unable to perform channel scanning and the master device is unable to perform channel evaluation, the channel scanning can be performed by the slave node, and the channel scanning and channel evaluation processes can be completed through the cooperation of the master and slave nodes, thereby satisfying the adaptive channel scanning process in the one-master-multiple-slave network architecture, and on this basis, adaptive channel evaluation and channel switching can be completed.

[0011] In some embodiments, determining whether the slave node needs to participate in channel scanning includes:

[0012] When the time since the last channel scan reaches a preset time and the master node is in a busy state, it is determined that the slave node needs to participate in the channel scan.

[0013] Therefore, when the time since the last channel scan reaches the time length, that is, the channel scanning cycle is reached, and the master node is in a busy state and cannot perform channel scanning, it is determined that the slave node needs to participate in the channel scanning. Only when the master node cannot perform channel scanning, it is determined that the slave node needs to participate in the channel scanning, so that the slave node can reasonably cooperate with the master node to complete the channel scanning process.

[0014] In some embodiments, the target slave nodes include more than two.

[0015] Therefore, when a slave node is required to participate in the channel scanning process, more than two target slave nodes can be determined to cooperate with the master node to perform channel scanning, thereby improving the efficiency of the channel scanning.

[0016] In some embodiments, the channel scanning notification information includes a channel identifier of a channel that the target slave node needs to scan.

[0017] Therefore, the channel scanning notification information sent by the master node to the target slave node also includes the channel identifier of the channel that the target slave node needs to scan as indicated by the master node, so that the target slave node can only scan the channel corresponding to the channel identifier indicated by the master node. In the case of multiple target slave nodes, the efficiency of channel scanning can be further improved by assigning different channel identifiers of channels that need to be scanned to different target slave nodes.

[0018] In some embodiments, the method further comprises:

[0019] After sending the channel scan notification information to the target slave node, until receiving the channel scan result, the channel at the time of sending the channel scan notification information is maintained unchanged.

[0020] Therefore, after sending the channel scan notification information to the target slave node, until receiving the channel scan results sent by the target slave node, the master node maintains the channel unchanged when sending the channel scan notification information, that is, the master node does not switch channels at this stage, so that the channel scan results returned by the target slave node can be received accurately and timely.

[0021] In some embodiments, the method further comprises:

[0022] When it is determined that the slave node does not need to participate in the channel scanning, a channel scan is performed to obtain a channel scanning result.

[0023] Therefore, when it is determined that the slave node does not need to participate in the channel scanning, the master node performs the channel scanning by itself to obtain the channel scanning result, thereby making full use of the channel scanning performance of the master node itself and improving the efficiency of the channel scanning.

[0024] In a second aspect, the present application provides a channel scanning method, the method comprising:

[0025] Receive channel scanning notification information sent by the master node;

[0026] Perform channel scanning based on the channel scanning notification information to obtain a channel scanning result;

[0027] The channel scanning result is sent to the master node, so that the master node performs channel assessment based on the channel scanning result.

[0028] Based on the channel scanning method provided in the embodiment of the present application, when the slave node receives the channel scanning notification information sent by the master node, the slave node performs channel scanning to obtain the channel scanning result, and then sends the channel scanning result to the master node, so that the master node can perform channel evaluation based on the channel scanning result, so that when the master device is unable to perform channel scanning and the master device is unable to perform channel evaluation, the channel scanning can be performed by the slave node, and the channel scanning and channel evaluation process can be completed through the cooperation of the master and slave nodes, thereby satisfying the adaptive channel scanning process in the one-master-multiple-slave network architecture, and on this basis, adaptive channel evaluation and channel switching can be completed.

[0029] In some embodiments, after obtaining the channel scanning result and before sending the channel scanning result to the master node, the method further includes:

[0030] The channel is switched to the channel at the time of receiving the channel scanning notification information.

[0031] Therefore, after obtaining the channel scanning result, the slave node also switches the channel to the channel when receiving the channel scanning notification information, so that the obtained channel scanning result can be sent to the master node accurately and timely.

[0032] In a third aspect, the present application provides a channel scanning device, the device comprising:

[0033] A participation analysis module is used to determine whether the slave node needs to participate in channel scanning;

[0034] A target slave node determination module, used to determine a target slave node participating in the channel scan when it is determined that the slave node needs to participate in the channel scan;

[0035] A scanning notification module, used to send channel scanning notification information to the target slave node, wherein the channel scanning notification information is used to instruct the target slave node to perform channel scanning;

[0036] The scanning result processing module is used to obtain the channel scanning result returned by the target slave node and perform channel evaluation based on the channel scanning result.

[0037] In a fourth aspect, the present application provides a channel scanning device, the device comprising:

[0038] A notification receiving module, used to receive channel scanning notification information sent by the master node;

[0039] A slave node scanning module, configured to perform channel scanning based on the channel scanning notification information and obtain a channel scanning result;

[0040] The result returning module is used to send the channel scanning result to the master node, so that the master node performs channel assessment based on the channel scanning result.

[0041] In a fifth aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method in any one of the embodiments described above when executing the computer program.

[0042] In a sixth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method in any one of the embodiments described above.

[0043] In a seventh aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method in any one of the embodiments described above.

[0044] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Moreover, the same reference numerals are used throughout the drawings to represent the same components. In the drawings:

[0046] Figure 1 A schematic diagram of an application scenario of a channel scanning method according to some embodiments of the present application;

[0047] Figure 2 A schematic diagram of a flow chart of a channel scanning method in some embodiments of the present application;

[0048] Figure 3 Schematic diagram of the flow of the channel scanning method in some other embodiments of the present application;

[0049] Figure 4 Schematic diagram of the flow of the channel scanning method in some other embodiments of the present application;

[0050] Figure 5 Schematic diagram of the flow of the channel scanning method in some other embodiments of the present application;

[0051] Figure 6Schematic diagram of the flow of the channel scanning method in some other embodiments of the present application;

[0052] Figure 7 Schematic diagram of the flow of the channel scanning method in some other embodiments of the present application;

[0053] Figure 8 A schematic diagram of the data format of the channel scanning result in some embodiments of the present application;

[0054] Fig. 9 A schematic diagram of the structure of a data packet transmitted between a master node and a slave node in some embodiments of the present application;

[0055] Fig.10 Schematic diagram of the flow of channel scanning methods in some specific examples of this application;

[0056] Fig.11 is a structural block diagram of a channel scanning device in some embodiments of the present application;

[0057] Fig.12 is a structural block diagram of a channel scanning device in some other embodiments of the present application;

[0058] Fig.13 This is a diagram of the internal structure of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0062] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0063] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0064] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0065] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "connection" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.

[0066] In a one-master-multiple-slave network structure, there is usually an adaptive channel switching function. That is, the master device, as the central device, obtains the key RF parameters in the environmental channel, evaluates the channel with the least interference, and then notifies the slave device to switch to the optimal channel synchronously. In this adaptive channel switching function, when the master device is scanning the channel, it will interrupt the original communication, because there are multiple WiFi channels, such as 1, 2, 3..., 13 in the 2.4G band, 36, 40, 44...60, 64, 149, 153, 157, 161, 165 in the 5G band, etc. When the master device is scanning the channel, it needs to poll and switch to different available channels, collect the RF parameters of different channels, and then evaluate the channel. In general, channel scanning will take a certain amount of time, such as 5 to 10 seconds, depending on the number of scanned channels and the scanning time of each channel.

[0067] The current logic of the master device performing channel scanning is that the channel scanning interval is at least N minutes (for example, 10 minutes), and channel scanning and channel evaluation can only be performed when the master device is idle. Based on this design, the master device can perform channel scanning and evaluation in most cases. However, there is still a high probability that channel scanning and channel evaluation cannot be performed. For example, the master device is always busy and cannot perform channel scanning. At this time, even if the network status is already relatively poor, the master device is busy and cannot perform channel scanning and channel evaluation. Therefore, it is impossible to switch the network channel through the results of channel scanning and evaluation, and it is impossible to improve the network status, thus losing the meaning of channel adaptive switching.

[0068] Based on this, the scheme of the embodiment of the present application utilizes the resources of the slave device to perform channel scanning through the slave device when necessary, for example, when the master device is busy and cannot perform channel scanning, thereby utilizing the resources of the slave device to complete the channel scanning process, so that even when the master device is busy, the channel scanning result can be obtained through the scanning of the slave device, thereby realizing adaptive switching of channels to improve the probability of optimizing the network status.

[0069] refer to Figure 1 As shown, in a network structure with one master and multiple slaves, there will be one master device and N slave devices. The master device, as the central device, obtains the key RF parameters in the environmental channel, evaluates the channel with the least interference, and then notifies the slave device to synchronously switch to the optimal channel to work. The types of master devices and slave devices are not limited. For example, in the field of video screen transmission, the master device can be a whole machine, and the slave device can be a screen transmitter; in the field of audio transmission in the whole machine WiFi application, the master device can be a device dedicated to receiving audio at the end of the whole machine, and the slave device can be an array microphone; in the WiFI PiP mode, the master device can be a GO device, and the slave device can be a GC device. It should be understood that in other fields involving one master and multiple slaves, the master device and the slave device can also be other types of devices. Among them, in the description of the following embodiments, the master device can also be referred to as a master node, and the slave device can also be referred to as a slave node.

[0070] refer to Figure 2 As shown, the embodiment of the present application provides a channel scanning method, which is applied to Figure 1 The method is described using the master device shown in as an example. The method includes:

[0071] Step S101: Determine whether the slave node needs to participate in channel scanning.

[0072] A slave node refers to a slave device in a one-master-multiple-slave network structure. The need for a slave node to participate in channel scanning means that when a channel scan is required, the slave node needs to participate in the channel scanning process.

[0073] Among them, the method of determining whether it is necessary for the slave node to participate in the channel scan is not limited. For example, in some embodiments, it can be determined based on the received user instructions that the slave node needs to participate in the channel scan. In some embodiments, the moment or time interval at which the slave node needs to participate in the channel scan can be preset, and when the preset moment or time interval is reached, it is determined that the slave node needs to participate in the channel scan. In some embodiments, the master node can decide on its own whether the slave node needs to participate in the channel scan. For example, the master node determines that the slave node needs to participate in the channel scan when the master node’s resources are insufficient or the master node is unable to perform the channel scan. In other embodiments, other conditions requiring the slave node to participate in the channel scan can also be set.

[0074] Step S102: when it is determined that a slave node needs to participate in the channel scan, a target slave node to participate in the channel scan is determined.

[0075] The target slave node refers to a slave node that is determined to participate in channel scanning among multiple slave devices in a one-master-multiple-slave system.

[0076] There is no limitation on the method for determining the target slave nodes participating in the channel scan. For example, in some embodiments, one or more idle slave devices among multiple slave devices may be determined as the target slave nodes. In other embodiments, one or more slave devices may be determined as the target slave nodes based on other mechanisms, such as one or more slave devices corresponding to a moment or time range, or one or more slave devices patrolled based on a patrol cycle. In other embodiments, other methods may be used to determine the slave nodes that need to participate in the channel scan.

[0077] It should be understood that one or more idle slave devices among multiple slave devices may also be determined in other ways, and the embodiments of the present application do not limit this. For the purpose of simple description, in the following embodiments, one or more idle slave devices among multiple slave devices are determined as target slave nodes as an example for description.

[0078] Step S103: Send channel scanning notification information to the target slave node, where the channel scanning notification information is used to instruct the target slave node to perform channel scanning.

[0079] The channel scanning notification information is information sent by the master device to the slave device to instruct the target slave node to perform channel scanning. The manner in which the master node sends the channel scanning notification information to the target slave node is not limited, and the embodiments of the present application do not make specific limitations.

[0080] Step S104: Acquire the channel scanning result returned by the target slave node, and determine the node that needs to perform channel switching based on the channel scanning result.

[0081] The channel scan result refers to the result obtained after the channel scan. After the target slave node obtains the channel scan result through scanning, it returns the channel scan result to the master node. After obtaining the channel scan result, the master node performs channel assessment based on the channel scan result.

[0082] After obtaining the channel scanning result, the master node may perform channel evaluation based on the channel scanning result, and determine whether channel switching is required in combination with the channel evaluation result.

[0083] Based on the channel scanning method provided in the embodiment of the present application as described above, when the master node needs the slave node to participate in the channel scanning, after determining the target slave node to participate in the channel scanning, the master node sends a channel scanning notification information to the target slave node to instruct the target slave node to perform channel scanning, and after obtaining the channel scanning result returned by the target slave node, performs channel evaluation based on the channel scanning result returned by the target slave node, so that when the master device is unable to perform channel scanning and the master device is unable to perform channel evaluation, the channel scanning can be performed by the slave node, and the channel scanning and channel evaluation processes can be completed through the cooperation of the master and slave nodes, thereby satisfying the adaptive channel scanning process in the one-master-multiple-slave network architecture, and on this basis, adaptive channel evaluation and channel switching can be completed.

[0084] In some embodiments, reference Figure 3 As shown, the determination of whether the slave node needs to participate in channel scanning in the above step S101 includes:

[0085] Step S1011: when the time since the last channel scan reaches a preset time and the master node is in a busy state, it is determined that the slave node needs to participate in the channel scan.

[0086] Among them, the duration from the last channel scan refers to the duration from the start or end time of the last channel scan to the current time. The last channel scan can be a channel scan performed by the master device or a channel scan participated in by the slave device. The embodiment of the present application does not impose specific restrictions on this.

[0087] The preset duration refers to a pre-set duration. The specific set duration is not limited. It can usually be determined based on the duration of network evaluation and channel switching, and can be determined based on the specific field of the one-master-multiple-slave network architecture. For the network architecture of one-master-multiple-slave in different fields, the network status may be different, so the cycle for evaluating the network status is also different. In some embodiments, the preset duration can also be set to a fixed duration.

[0088] The master node is in a busy state, which means that the remaining processing capacity of the master node cannot complete the channel scanning process. Whether the master node is in a busy state can be determined based on various possible methods. For example, whether it is in a busy state can be determined based on the used resources of the master node. For example, when the used resources are greater than a preset resource threshold, it is determined that the master node is in a busy state. The type of used resources is not limited, for example, it can be CPU usage, memory occupancy, etc., but is not limited thereto.

[0089] There is no limit to the way to determine whether a device is idle. For example, in some embodiments, it can be determined based on business logic whether the slave device is in an idle state. Taking the field of video screen transmission as an example, the screen transmission status of the screen transmitter usually has two states: connected but not projected, and connected and projected. If the status of the screen transmitter is connected but not projected, the non-projected state means that it is in an idle state. Taking audio transmission in the whole machine WiFi application as an example, if the microphone is in a muted state, it can be considered that the device is in an idle state.

[0090] In other embodiments, the judgment can be made based on the communication status. For example, during the connection between the master node AP and the slave node STA, it can be judged whether the data packet between the AP and the STA contains valid business data. If it contains valid business data, it is considered that the STA is not in an idle state. If it does not contain valid business data, it is considered that the STA is in an idle state. Taking the field of video screen transmission as an example, if the transmitted data packet contains a video stream, such as an RTP stream, it is considered that the screen transmitter is not in an idle state. If it does not contain a video stream, it is considered that the screen transmitter is in an idle state. Taking audio transmission in the whole machine WiFi application as an example, the audio processing algorithm can be used to analyze whether there is valid audio in the data packet to determine whether the microphone is in an idle state.

[0091] Therefore, when the time since the last channel scan reaches the time length, that is, the channel scanning cycle is reached, and the master node is in a busy state and cannot perform channel scanning, it is determined that the slave node needs to participate in the channel scanning. Only when the master node cannot perform channel scanning, it is determined that the slave node needs to participate in the channel scanning, so that the slave node can reasonably cooperate with the master node to complete the channel scanning process.

[0092] In some embodiments, the target slave nodes include more than two.

[0093] Therefore, when a slave node is required to participate in the channel scanning process, more than two target slave nodes can be determined to cooperate with the master node to perform channel scanning, thereby improving the efficiency of the channel scanning.

[0094] In some embodiments, the channel scanning notification information includes a channel identifier of a channel that the target slave node needs to scan.

[0095] Therefore, the channel scanning notification information sent by the master node to the target slave node also includes the channel identifier of the channel that the target slave node needs to scan as indicated by the master node, so that the target slave node can only scan the channel corresponding to the channel identifier indicated by the master node. In the case of multiple target slave nodes, the efficiency of channel scanning can be further improved by assigning different channel identifiers of channels that need to be scanned to different target slave nodes.

[0096] In some embodiments, reference Figure 4 As shown, the method also includes:

[0097] Step S1034: After sending the channel scan notification information to the target slave node, until receiving the channel scan result, the channel at the time of sending the channel scan notification information is maintained unchanged.

[0098] There can be multiple different channels between the master node and the slave node, and one of the channels can be selected for communication each time. When the master device and the slave device use the same channel, the communication process between the master device and the slave device can be completed. Among them, in a one-master-multiple-slave network structure, the master node and all the slave nodes can use the same channel to realize communication between the master device and all the slave nodes.

[0099] Therefore, after sending the channel scan notification information to the target slave node, until receiving the channel scan results sent by the target slave node, the master node maintains the channel unchanged when sending the channel scan notification information, that is, the master node does not switch channels at this stage, so that the channel scan results returned by the target slave node can be received accurately and timely.

[0100] In some embodiments, reference Figure 5 As shown, the method also includes:

[0101] Step S105: When it is determined that the slave node does not need to participate in the channel scanning, a channel scan is performed to obtain a channel scanning result.

[0102] Therefore, when it is determined that the slave node does not need to participate in the channel scanning, the master node performs the channel scanning by itself to obtain the channel scanning result, thereby making full use of the channel scanning performance of the master node itself and improving the efficiency of the channel scanning.

[0103] refer to Figure 6 As shown, the embodiment of the present application provides a channel scanning method, which is applied to Figure 1 The slave device shown in is used as an example for explanation. The method includes:

[0104] Step S201: receiving channel scanning notification information sent by the master node.

[0105] The channel scanning notification information refers to the information sent by the master node to the slave node when the master node determines that the slave device needs to participate in the channel scanning, so as to instruct the slave node to perform the channel scanning process.

[0106] Step S202: Perform channel scanning based on the channel scanning notification information to obtain a channel scanning result.

[0107] There is no limitation on the way of performing channel scanning from the node. After performing the channel scanning, the channel scanning result can be obtained.

[0108] Step S203: Send the channel scanning result to the master node, so that the master node performs channel assessment based on the channel scanning result.

[0109] After obtaining the channel scanning result, the slave node may send the channel scanning result to the master node, so that the master node can perform channel evaluation based on the channel scanning result returned by the slave node. For example, after obtaining the channel scanning result, the master node may perform channel evaluation based on the channel scanning result, and determine whether channel switching is required in combination with the channel evaluation result. If it is determined that channel switching is required, the master node may determine the channel to which channel switching is required, and then notify each slave node to perform channel switching.

[0110] Based on the channel scanning method provided in the embodiment of the present application, when the slave node receives the channel scanning notification information sent by the master node, the slave node performs channel scanning to obtain the channel scanning result, and then sends the channel scanning result to the master node, so that the master node can perform channel evaluation based on the channel scanning result, so that when the master device is unable to perform channel scanning and the master device is unable to perform channel evaluation, the channel scanning can be performed by the slave node, and the channel scanning and channel evaluation process can be completed through the cooperation of the master and slave nodes, thereby satisfying the adaptive channel scanning process in the one-master-multiple-slave network architecture, and on this basis, adaptive channel evaluation and channel switching can be completed.

[0111] In some embodiments, reference Figure 7 As shown, after obtaining the channel scanning result in the above step S202 and before sending the channel scanning result to the master node in step S203, the method further includes:

[0112] Step S2023: Switch the channel to the channel when the channel scan notification information is received.

[0113] The communication channel between the master node and the slave node may have multiple different channels. Each time they communicate, the master node and the slave node switch to the same channel for communication.

[0114] Therefore, after obtaining the channel scanning result, the slave node also switches the channel to the channel when receiving the channel scanning notification information, so that the obtained channel scanning result can be sent to the master node accurately and timely.

[0115] Based on the above-mentioned embodiments, the following is an illustration in conjunction with a specific example thereof. In this specific example, an example is taken in which a master device notifies a slave node to participate in channel scanning when the master device is busy.

[0116] In the process of executing the embodiment of the present application, the communication between the master device and the slave device can be carried out according to the set communication protocol format to complete the data communication process in which the slave device participates in the channel scanning process.

[0117] In some embodiments, a data packet communicated between a master device and a slave device may include: a data header (Header), a data length (Length), a flag bit (cmd), a data body (Data), a check bit (CRC16), and a tail bit (Tail).

[0118] The data header is used to indicate the beginning of the data packet. The specific content used to indicate the beginning of the data packet is not limited. For example, in some embodiments, the content of the data header can be set to 0xA5.

[0119] The data length is used to represent the length occupied by the data length, the flag bit, the data body, and the check bit, for example, the number of bytes occupied.

[0120] The flag bit is used to characterize the type of data packet transmitted. For example, in some embodiments, when the flag bit is the first flag bit, the data packet can be considered to be a data packet of channel scan notification information sent by the master node to the slave node, and when the flag bit is the second flag bit, the data packet can be considered to be a data packet of channel scan results sent by the slave node to the master node. The types of the first flag bit and the second flag bit are not limited, for example, the first flag bit can be set to 1 and the second flag bit can be set to 2. It should be understood that in other embodiments, the first flag bit and the second flag bit can be set to other contents, and more flag bits can be set to transmit other types of data packets between the master node and the slave node.

[0121] The data body is used to carry the specific data content of the transmission. Taking the data packet in which the flag bit represents the transmission of channel scan notification information as an example, each byte may represent a channel, and the specific byte content may be a specific channel identifier, which is used to indicate the channel that needs to be assisted in scanning by the slave node. For example, in some embodiments, the byte content of the byte may be 36, 40, 44, etc., which is used to indicate that the slave node needs to assist in scanning 36, 40, 44 and other channels, and the specific implementation is not limited to this. Taking the data packet in which the flag bit represents the transmission of the channel scan result as an example, the data body contains the scan result of each channel. The specific way of including the scan result of each channel is not limited. For example, the corresponding data content format can be set for the channel scan result of each channel. For example, the channel scan result of each channel may include a channel identifier, busy time, background noise, load, number of BSSs, and signal strength. Among them, the channel identifier represents the identifier of the scanned channel, and the length occupied can be 1 byte; the busy time represents the busy time of the scanned channel, and the byte length occupied can be 2 bytes; the background noise represents the radio noise level of the scanned channel, and the byte occupied can be 1 byte; the load represents the estimated network bandwidth of the scanned channel, and the byte occupied can be 2 bytes; the number of BSS represents the number of hotspots of the scanned channel, and the byte occupied can be 1 byte; the signal strength represents the signal strength of the signal (such as WiFi signal) existing in the scanned channel, and the byte occupied can be 1 byte, such as Figure 8 shown.

[0122] The check bit is used to represent the check data, for example, it can be the check result of the data length, flag bit and data body.

[0123] The end bit is used to indicate the end of the data packet. The content used to indicate the end of the data packet is not limited and can be the same as or different from the content of the data header. In some embodiments, the content of the end bit can be set to be the same as the content of the data header, for example, it can be set to 0xA5.

[0124] The number of bytes occupied by the data header, data length, flag bit, data body, check bit and end bit can be set based on actual needs. For example, in some embodiments, the byte length occupied by the data header, data length, flag bit, and end bit can all be 1 byte, the byte length occupied by the data body can occupy a certain length of bytes based on the actual data content to be carried, and the byte length occupied by the check bit can be 2 bytes, such as Fig. 9 shown.

[0125] Based on the above-mentioned embodiments, reference Fig.10As shown, during operation, the master node periodically obtains the channel parameters of the current channel, where the channel parameters may specifically be the radio frequency parameters of the current channel, and determines whether a channel scan has been performed before.

[0126] If channel scanning has been performed, based on the channel parameters of the current channel, it is determined whether the load capacity of the current channel is lower than the threshold level. If so, channel switching is performed. That is, the communication channel between the master node and all slave nodes is switched to a new channel, and the communication quality (such as load capacity) of the new channel is higher than the communication quality of the current channel, and then it is determined whether the time since the last channel scan reaches the preset time.

[0127] If the channel scan has not been performed, it is determined whether the time since the last channel scan reaches a preset time.

[0128] If the time since the last channel scan does not reach the preset time, the above process of obtaining the channel parameters of the current channel continues.

[0129] If the time from the last channel scan reaches the preset time, it is determined whether the master node is currently in an idle state. If the master node is in an idle state, the master node performs channel scan by itself to obtain the channel scan result.

[0130] If the master node is not in an idle state, that is, the master node is busy, the master node determines whether there is an idle slave node. If there is no idle slave node, the above-mentioned process of obtaining the channel parameters of the current channel continues. If there is an idle slave node, the target slave node is determined from the idle slave node, wherein the determined target slave node may be only one or may include multiple. After determining the target slave node, the master node can also simultaneously determine the channel identifier of the channel that each target slave node needs to scan. Take the target slave node including slave node K1 and slave node K2 as an example. The channel identifier of the channel that the slave node K1 needs to scan includes XD1, XD2, ... XDm, and the channel identifier of the channel that the slave node K2 needs to scan includes xd1, xd2, ... xdn, wherein the channel identifier of the channel that the slave node K1 needs to scan and the channel identifier of the channel that the slave node K2 needs to scan may be completely different, or there may be a partial intersection or be completely the same, and the embodiment of the present application does not limit this.

[0131] After determining the target slave node, the master node sends channel scanning notification information to each target slave node. The channel scanning notification information includes the channel identifier of the channel that the corresponding target slave node needs to scan.

[0132] After receiving the channel scan notification information, the target slave node performs channel scan on the channel corresponding to the channel identifier contained in the channel scan notification information, obtains the channel scan result, and returns the obtained channel scan result to the master node.

[0133] After obtaining the channel scanning result, the master node performs channel evaluation based on the channel scanning result, and then determines whether channel switching is required in combination with the channel parameters of the current channel obtained. The channel scanning result obtained by the master node can be the channel scanning result obtained by the master node itself, or the channel scanning result obtained after the slave node performs channel scanning.

[0134] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0135] Based on the same inventive concept, the embodiment of the present application also provides a channel scanning device for implementing the channel scanning method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more channel scanning device embodiments provided below can refer to the limitations on the channel scanning method above, and will not be repeated here.

[0136] The present application also provides a channel scanning device, wherein, referring to Fig.11 As shown, the channel scanning device in some embodiments includes a participation analysis module 111, a target slave node determination module 112, a scanning notification module 113 and a scanning result processing module 114. Among them:

[0137] A participation analysis module 111 is used to determine whether a slave node needs to participate in channel scanning;

[0138] A target slave node determination module 112, configured to determine a target slave node to participate in the channel scan when it is determined that the slave node needs to participate in the channel scan;

[0139] A scanning notification module 113, configured to send channel scanning notification information to the target slave node, wherein the channel scanning notification information is used to instruct the target slave node to perform channel scanning;

[0140] The scanning result processing module 114 is used to obtain the channel scanning result returned by the target slave node and perform channel evaluation based on the channel scanning result.

[0141] In some embodiments, the participation analysis module 111 is used to determine that the slave node needs to participate in the channel scan when the time since the last channel scan reaches a preset time and the master node is in a busy state.

[0142] In some embodiments, the target slave nodes include more than two.

[0143] In some embodiments, the channel scanning notification information includes a channel identifier of a channel that the target slave node needs to scan.

[0144] In some embodiments, the apparatus further comprises:

[0145] The channel maintaining module is used to maintain the channel unchanged when sending the channel scanning notification information after sending the channel scanning notification information to the target slave node until receiving the channel scanning result.

[0146] In some embodiments, the apparatus further comprises:

[0147] The master node scanning module is used to perform channel scanning to obtain channel scanning results when it is determined that the slave node does not need to participate in the channel scanning.

[0148] The present application also provides a channel scanning device, wherein, referring to Fig.12 As shown, the channel scanning device in some embodiments includes a notification receiving module 121, a slave node scanning module 122 and a result returning module 123. Among them:

[0149] Notification receiving module 121, used to receive channel scanning notification information sent by the master node;

[0150] A slave node scanning module 122, configured to perform channel scanning based on the channel scanning notification information and obtain a channel scanning result;

[0151] The result returning module 123 is configured to send the channel scanning result to the master node, so that the master node performs channel assessment based on the channel scanning result.

[0152] In some embodiments, the slave node scanning module 122 is further configured to switch the channel to the channel used for receiving the channel scanning notification information after obtaining the channel scanning result and before sending the channel scanning result to the master node.

[0153] Each module in the above-mentioned channel scanning device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0154] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig.13 As shown. The electronic device includes a processor, a memory, a communication interface and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external device in a wired or wireless manner, for example, it can communicate with a server to conduct a conversation with a user terminal, and the wireless method can be implemented through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a channel scanning method is implemented. The input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0155] Those skilled in the art will understand that Fig.13 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0156] In one embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the channel scanning method in any of the embodiments described above are implemented.

[0157] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the channel scanning method in any of the embodiments described above are implemented.

[0158] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the steps of the channel scanning method of any of the above embodiments.

[0159] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application. In particular, as long as there is no structural conflict, the various technical features mentioned in the various embodiments can be combined in any way. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions that fall within the scope of the claims.

Claims

1. A channel scanning method, characterized in that: The method comprises: Determine whether the slave node needs to participate in channel scanning; In the case where it is determined that the slave node needs to participate in the channel scanning, determining a target slave node to participate in the channel scanning; Sending channel scanning notification information to the target slave node, wherein the channel scanning notification information is used to instruct the target slave node to perform channel scanning; A channel scanning result returned by the target slave node is obtained, and a channel assessment is performed based on the channel scanning result.

2. The method according to claim 1, characterized in that The determining whether the slave node needs to participate in channel scanning includes: When the time since the last channel scan reaches a preset time and the master node is in a busy state, it is determined that the slave node needs to participate in the channel scan.

3. The method according to claim 1, characterized in that The target slave nodes include more than two.

4. The method according to claim 1, characterized in that: The channel scanning notification information includes the channel identifier of the channel that the target slave node needs to scan.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After sending the channel scan notification information to the target slave node, until receiving the channel scan result, the channel at the time of sending the channel scan notification information is maintained unchanged.

6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When it is determined that the slave node does not need to participate in the channel scanning, a channel scan is performed to obtain a channel scanning result.

7. A channel scanning method, characterized in that: The method comprises: Receive channel scanning notification information sent by the master node; Perform channel scanning based on the channel scanning notification information to obtain a channel scanning result; The channel scanning result is sent to the master node, so that the master node performs channel assessment based on the channel scanning result.

8. The method according to claim 7, characterized in that After obtaining the channel scanning result and before sending the channel scanning result to the master node, the method further includes: The channel is switched to the channel at the time of receiving the channel scanning notification information.

9. A channel scanning device, characterized in that: The device comprises: A participation analysis module is used to determine whether the slave node needs to participate in channel scanning; A target slave node determination module, used to determine a target slave node participating in the channel scan when it is determined that the slave node needs to participate in the channel scan; A scanning notification module, used to send channel scanning notification information to the target slave node, wherein the channel scanning notification information is used to instruct the target slave node to perform channel scanning; The scanning result processing module is used to obtain the channel scanning result returned by the target slave node and perform channel evaluation based on the channel scanning result.

10. A channel scanning device, characterized in that: The device comprises: A notification receiving module, used to receive channel scanning notification information sent by the master node; A slave node scanning module, configured to perform channel scanning based on the channel scanning notification information and obtain a channel scanning result; The result returning module is used to send the channel scanning result to the master node, so that the master node performs channel assessment based on the channel scanning result.

11. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.