Equipment communication method and device, electronic equipment and computer readable storage medium
By screening mutually exclusive channels and communicating in a multi-communication module scenario, the channel screening problem that is only suitable for single modules in the prior art is solved, and channel allocation and communication in a multi-communication scenario is realized, and communication quality is improved.
Patent Information
- Application Number
- CN202411760922.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
AI Technical Summary
The existing channel filtering scheme is only applicable to a single communication module and cannot effectively handle multiple communication modules.
By obtaining the preselected channel list obtained based on channel score filtering, matching and unmatched channels in the multi-communication module are identified, channels that are mutually exclusive to the matched channels are filtered, and communication is carried out separately.
Channel allocation and communication in multi-communication module scenarios are realized, the effectiveness of channel screening and equipment communication quality are improved, and the problem that the single-module solution cannot be applied.
Smart Images

Figure CN119584300A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and specifically to a device communication method, apparatus, electronic device, and computer-readable storage medium. Background Art
[0002] Communication technology relies on communication channels to achieve data and information transmission and sharing. Currently, the design relies on hostapd's own default algorithm or the corresponding WiFi chip's own algorithm to select an optimal channel for upper-level applications.
[0003] However, the current solution for screening channels is mainly aimed at the use of a single communication module and cannot be applied to scenarios with multiple communication modules. Summary of the invention
[0004] The embodiments of the present application provide a device communication method, apparatus, electronic device and computer-readable storage medium, which can realize channel allocation and communication in a multi-communication module scenario.
[0005] In a first aspect, an embodiment of the present application provides a device communication method, which is applied to a communication device, wherein the communication device includes a communication module, and the method includes:
[0006] Obtaining a pre-selected channel list, wherein the pre-selected channel list is obtained by screening based on channel scores;
[0007] If the communication modules include at least two, identifying a first communication module that has matched the communication channel and a second communication module that has not matched the communication channel from the communication modules;
[0008] Filtering out a second communication channel mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module;
[0009] Communication is performed through the first communication module based on the first communication channel, and through the second communication module based on the second communication channel.
[0010] In a second aspect, an embodiment of the present application further provides a device communication apparatus, which is applied to a communication device, wherein the communication device includes a communication module, and the apparatus includes:
[0011] Obtaining a pre-selected channel list, wherein the pre-selected channel list is obtained by screening based on channel scores;
[0012] If the communication modules include at least two, identifying a first communication module that has matched the communication channel and a second communication module that has not matched the communication channel from the communication modules;
[0013] Filtering out a second communication channel mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module;
[0014] Communication is performed through the first communication module based on the first communication channel, and through the second communication module based on the second communication channel.
[0015] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and which implements the steps in the above-mentioned device communication method when the computer program is executed by the processor.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned device communication method are implemented.
[0017] In a fifth aspect, the embodiments of the present application further provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.
[0018] The communication device of an embodiment of the present application obtains a pre-selected channel list, which is obtained based on channel score screening. If the communication module includes at least two, a first communication module with a matched communication channel and a second communication module with an unmatched communication channel are identified from the communication module, and a second communication channel that is mutually exclusive with the first communication channel is screened from the pre-selected channel list based on the first communication channel matched by the first communication module, and communication is performed through the first communication module based on the first communication channel and through the second communication module based on the second communication channel.
[0019] Among them, the embodiment of the present application realizes channel allocation and communication in a multi-communication module scenario by screening mutually exclusive communication channels for communication in a multi-communication module scenario, and solves the defect that the existing channel screening scheme is only applicable to a single communication module. Among them, by further screening the communication channels that support simultaneous communication of multiple communication modules on the basis of the pre-selected channel list screened based on channel score, the effectiveness of the screened communication channels is improved and the communication quality of the device is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a schematic diagram of a scenario in which a communication device according to an embodiment of the present application executes the device communication method;
[0022] Figure 2 It is a flowchart of a device communication method provided in an embodiment of the present application;
[0023] Figure 3 This is a schematic diagram of a channel with a bandwidth of 20 MHz in the 2.4 GHz frequency band provided in an embodiment of the present application;
[0024] Figure 4 This is a schematic diagram of a channel with a bandwidth of 80 MHz under the 5G frequency band provided in an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of a process for obtaining each element in a target preferred channel array provided in an embodiment of the present application;
[0026] Figure 6 It is a schematic diagram of the process of AP channel selection provided by an embodiment of the present application;
[0027] Figure 7 It is a schematic diagram of the process of p2p channel selection provided in an embodiment of the present application;
[0028] Figure 8 This is a schematic diagram of the Android architecture provided in the embodiment of the present application;
[0029] Fig. 9 It is a structural diagram of a device communication apparatus provided in an embodiment of the present application;
[0030] Fig.10 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in this application to clearly and completely describe the technical solutions in this application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments in the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0032] The embodiments of the present application provide a device communication method, device, electronic device and computer-readable storage medium. Specifically, the embodiments of the present application provide a device communication device suitable for electronic devices (communication devices), which is used to allocate communication channels for multi-communication module scenarios involved in the device communication process to ensure that the communication device can perform simultaneous communication tasks based on multi-communication modules, and the electronic device includes a terminal device or a server, and the terminal device includes but is not limited to mobile phones, tablet computers, laptops, televisions, Bluetooth speakers and other devices with communication functions. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms and other basic cloud computing services, etc. The server can be directly or indirectly connected via wired or wireless communication.
[0033] See also Figure 1 , Figure 1 : is a schematic diagram of a scenario in which a communication device according to an embodiment of the present application executes the device communication method, wherein the specific execution process of the communication device executing the device communication method is as follows:
[0034] The communication device 10 obtains a preselected channel list, which is obtained based on channel score screening. If the communication module includes at least two, a first communication module that has matched the communication channel and a second communication module that has not matched the communication channel are identified from the communication module, and a second communication channel that is mutually exclusive with the first communication channel is screened out from the preselected channel list according to the first communication channel that has matched the first communication module, and communication is performed through the first communication module based on the first communication channel and through the second communication module based on the second communication channel.
[0035] The communication module includes a wifi module or a bluetooth module, etc. The embodiment of the present application is applicable to channel allocation in a dual communication module scenario and the execution of dual communication tasks of the dual communication modules. For example, two wifi chips are set in a mobile phone, and after the two wifi chips respectively determine mutually exclusive communication channels, they respectively execute the functions of wifi connection and opening hotspot.
[0036] In summary, the embodiments of the present application implement channel allocation and communication in a multi-communication module scenario by screening mutually exclusive communication channels for communication, thereby solving the defect that the existing channel screening scheme is only applicable to a single communication module. Among them, by further screening the communication channels that support simultaneous communication of multiple communication modules based on the pre-selected channel list screened based on channel score, the effectiveness of the screened communication channels is improved and the communication quality of the device is improved.
[0037] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.
[0038] See also Figure 2 , Figure 2 A flowchart of a device communication method provided in an embodiment of the present application. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings. Specifically, the device communication method is performed by a communication device, which is provided with a communication module. The communication device includes but is not limited to mobile phones, computers, smart speakers and other devices. Specifically, the process of the communication device performing the device communication method specifically includes:
[0039] 101. Obtain a pre-selected channel list, where the pre-selected channel list is obtained by screening based on channel scores.
[0040] Among them, the communication module includes a wifi module or a bluetooth module, etc., and the embodiment of the present application is applicable to the channel allocation in the dual communication module scenario and the execution of the dual communication tasks of the dual communication module. For example, two wifi chips are set in the mobile phone, and the two wifi chips respectively perform the functions of wifi connection and opening the hotspot after determining mutually exclusive communication channels. Furthermore, the embodiment of the present application is explained by taking the communication module as a wifi module as an example, and other types of communication modules can be understood by reference.
[0041] The pre-selected channel list is a list obtained when filtering channels for a single communication module. For example, the best communication channel is selected for the upper layer application (system service layer or application layer, etc.) by relying on the default algorithm of hostpd itself or the algorithm of the corresponding wifi chip itself. Hostpd is the underlying software for operating the ap function in the Android hardware abstraction layer (HAL). The ap function refers to the hotspot function. For example, using a mobile phone to turn on the hotspot means turning on the ap function of the mobile phone.
[0042] For example, if the communication module is a wifi module, after completing a scan, the wifi driver will score each channel according to the surrounding hot spots and calculate the pollution value. Then, the channels are arranged from small to large according to the pollution value to obtain a pre-selected channel list. Among them, the smaller the pollution value, the cleaner the channel.
[0043] The channel score refers to the communication quality score of each communication channel. For example, the channel score of each communication channel is comprehensively determined based on stability, anti-interference, signal strength, bit error rate, signal-to-noise ratio and channel delay.
[0044] Among them, the communication channel (referred to as channel) refers to the channel for transmitting signals. It can be a physical transmission path, such as the propagation of radio waves in the air, or it can be an abstract concept, referring to the bandwidth that allows signal transmission in a specific frequency band. Communication channels can be further divided into different types, such as wireless channels, optical fiber channels, etc.
[0045] It is understandable that, in the case of a single communication module, the best communication channel can be directly selected based on the pre-selected channel list for the upper layer to use, for example, the communication channel with the highest channel score is directly selected for communication. However, the embodiment of the present application is aimed at a multi-communication module scenario. Therefore, after obtaining the pre-selected channel list, it further controls the selection of communication channels from the pre-selected channel list to realize the simultaneous operation of multiple communication modules of the communication device, for example, assigning communication channels to each communication module respectively, so as to realize the simultaneous execution of the communication tasks of each communication module.
[0046] 102. If the communication modules include at least two, identify a first communication module that has matched a communication channel and a second communication module that has not matched a communication channel from the communication modules.
[0047] It should be noted that a matched communication channel refers to a communication module to which a communication channel has been allocated, and an unmatched communication channel refers to a communication module to which a communication channel has not been allocated.
[0048] Among them, by determining the first communication module with a matched communication channel and the second communication module with an unmatched communication channel, it is helpful to determine the communication channel of the communication module suitable for the unmatched communication channel based on the first communication channel matched by the first communication module, so as to avoid communication impact caused by channel interference when multiple communication modules communicate.
[0049] 103. Filter out a second communication channel that is mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module.
[0050] Determining the second communication channel mutually exclusive with the first communication channel based on the matched first communication channel helps to simultaneously complete the multi-communication tasks of the multi-communication modules based on the mutually exclusive first communication channel and the second communication channel.
[0051] 104. Communicate via the first communication module based on the first communication channel, and communicate via the second communication module based on the second communication channel.
[0052] It can be understood that, since the first communication channel and the second communication channel are mutually exclusive, when one communication module communicates using the first communication channel, it will not affect another communication module that communicates based on the second communication channel.
[0053] In summary, the embodiments of the present application implement channel allocation and communication in a multi-communication module scenario by screening mutually exclusive communication channels for communication, thereby solving the defect that the existing channel screening scheme is only applicable to a single communication module. Among them, by further screening the communication channels that support simultaneous communication of multiple communication modules based on the pre-selected channel list screened based on channel score, the effectiveness of the screened communication channels is improved and the communication quality of the device is improved.
[0054] For example, through the device communication method of the embodiment of the present application, channel allocation in the dual Wi-Fi module scenario of the communication device is realized, so that the dual Wi-Fi modules can communicate based on their respective assigned communication channels without affecting each other, thereby realizing the simultaneous execution of dual communication tasks.
[0055] To further explain, the so-called mutually exclusive channels or channel mutual exclusion means that two or more communication channels (referred to as channels) can transmit data simultaneously without affecting each other. For example, for the channels in the 2.4G frequency band, since the center frequency of 2.4G is in the channel itself, mutually exclusive channels refer to channels with non-overlapping frequency bands, such as Figure 3 As shown, Figure 3 2 is a schematic diagram of a channel with a bandwidth of 20 MHz in the 2.4 GHz frequency band provided in an embodiment of the present application, wherein Figure 3 It can be seen that the bandwidth is 20 MHz, and channel 1 (center frequency is 2.412 Hz), channel 6 (center frequency is 2.437 Hz), and channel 11 (center frequency is 2.462 Hz) are channels with non-overlapping frequency bands.
[0056] It should be noted that a frequency band is a continuous frequency range that includes all frequencies that can be used for signal transmission. A frequency band is usually defined by two boundary frequencies, such as 2.412 GHz to 2.427 GHz, or 2.442 GHz to 2.462 GHz. In wireless communications, a frequency band is a frequency range allocated to a specific service (such as Wi-Fi, cellular networks, etc.).
[0057] And, bandwidth, also known as bandwidth, refers to the maximum width of the frequency range that a channel can transmit. It represents the capacity of the signal transmission channel, measured in Hertz (Hz). The larger the bandwidth, the more data can be transmitted in theory. For example, a channel with a bandwidth of 20MHz can transmit more data than a channel with a bandwidth of 10MHz. Figure 3 As shown, the channel has a bandwidth of 20 MHz and a distance of 1 MHz is reserved between channels, so each channel displays a width of 1+20+1=22 MHz. For example, for channel 6, the corresponding frequency band is 2.426 GHz-2.448 GHz.
[0058] For the channels in the 5G frequency band, mutually exclusive channels refer to channels with different center frequencies (among which, channels with the same frequency band and bandwidth in 5G have a common center frequency). For example, see Figure 4 , Figure 4 : is a schematic diagram of a channel with a bandwidth of 80 MHz under the 5G frequency band provided in an embodiment of the present application, wherein Figure 4 It can be seen that 5G has four modes: 20MHz, 40MHz, 80MHz, and 160MHz. Figure 4 The channels occupied by the four bandwidth modes are shown here. Figure 4 Taking the 36-64 channels of 5G as an example, it can be seen that under the 40MHz bandwidth, 36 and 40, 44 and 48, 52 and 56, 60 and 64 respectively form a wide channel together, under the 80MHz bandwidth, 36-48 and 52-64 respectively form a wide channel together, and under the 160MHz bandwidth, 36-64 all form a wide channel together. In the case of forming a wide channel together, the center frequencies of the channels that form a wide channel together are the same. For example, for a 5G channel with a bandwidth of 80MHz, every 4 available channels (for example, 36-48) correspond to the same center frequency (for example, the center frequency corresponding to the available channels 36-48 is: 5170MHz+80MHz / 2=5210MHz, and the center frequency corresponding to the available channels 52-64 is: 5170MHz+80MHz+80MHz / 2=5290MHz).
[0059] Therefore, for the 5G channel with a bandwidth of 80 MHz, the channels in the available channels 36-48 and the channels in the available channels 52-64 are mutually exclusive, that is, they correspond to different center frequencies, respectively.
[0060] Based on the characteristics of the center frequency, for 5G channels with a bandwidth of 80MHz, every 4 available channels (for example, 36-48) can belong to the same band (because they have the same center frequency), and can be divided into 7 bands. They are: band1, / / 36-48, 5180-5240MHz; band2, / / 52-64, 5260-5320MHz; band3, / / 100-112, 5500-5560MHz; band4, / / 116-128, 5580-5640MHz; band5, / / 132-144, 5660-5720MHz; band6, / / 149-161, 5745-5805MHz; band7, / / 165-177, 5825-5885MHz. Therefore, for 5G channels with a bandwidth of 80MHz, as long as the channels belong to different bands, each channel corresponds to a different center frequency, and the channels are mutually exclusive channels.
[0061] Therefore, in an embodiment of the present application, for channels in the 2.4 frequency band, mutually exclusive channels can be selected in a manner that the frequency bands do not overlap, and for channels in the 5G frequency band, mutually exclusive channels can be selected in a manner that the center frequencies are different or the bands are different. That is, optionally, in some embodiments of the present application, the step of "selecting a second communication channel that is mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module" includes:
[0062] Determining a first communication channel that has been matched by the first communication module;
[0063] If the first communication channel is a first frequency band network, selecting a second communication channel from the pre-selected channel list that does not overlap with the frequency band of the first communication channel;
[0064] If the second communication channel is a second frequency band network, a second communication channel having a center frequency different from that of the first communication channel is screened out from the pre-selected channel list.
[0065] For example, the first frequency band network is a 2.4G network, and the second frequency band network is a 5G network.
[0066] For example, when the 2.4G bandwidth is 20MHz, channel 1 and channel 6 are channels with non-overlapping frequency bands, channel 6 and channel 11 are channels with non-overlapping frequency bands, and channel 1 and channel 2, and channel 1 and channel 3 are channels with overlapping frequency bands.
[0067] For example, when the 5G bandwidth is 80 MHz, the first communication channel can be a channel among 36-48, and the second communication channel can be a channel among 52-64 or a channel among 101-112.
[0068] In summary, by determining the channel based on the mutual exclusion characteristic, the first communication module and the second communication module can avoid channel interference when performing communication tasks respectively, and the simultaneous communication tasks of the first communication module and the second communication module can be realized.
[0069] Optionally, in an embodiment of the present application, in order to improve the efficiency of channel screening in the application stage, a target preferred channel array can be pre-configured based on the characteristics of mutual exclusion, and then, when the communication device needs to screen the communication channel, the mutually exclusive communication channel can be quickly selected directly from the target preferred channel array, that is, optionally, in some embodiments of the present application, the step of "screening out a second communication channel that is mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module" includes:
[0070] Determine a target preferred channel array, wherein the target preferred channel array includes at least two mutually exclusive communication channels to be selected, and the communication channels to be selected are obtained by performing mutually exclusive screening on the communication channels in the pre-selected channel list;
[0071] A second communication channel mutually exclusive with the first communication channel is screened out from the candidate communication channels according to the first communication channel matched by the first communication module.
[0072] The target preferred channel array includes the communication channels to be selected which can be screened from the pre-selected channel list based on the above-mentioned channel mutual exclusion principle, that is, the target preferred channel array includes the communication channels (referred to as channels) with higher channel scores and mutually exclusive from the pre-selected channel list. The target preferred channel array is also called the best channel list.
[0073] Furthermore, when it is necessary to screen the second communication channel for the second communication module, a communication channel different from the first communication channel of the first communication module can be directly screened out from the target preferred channel array, and the communication channel can be used as the second communication channel, thereby improving the efficiency of communication channel screening. That is, optionally, in some embodiments of the present application, the step of "screening out a second communication channel mutually exclusive with the first communication channel from the selected communication channels according to the first communication channel matched by the first communication module" includes:
[0074] Determining a first communication channel that has been matched by the first communication module;
[0075] The other communication channels among the communication channels to be selected except the first communication channel are set as second communication channels.
[0076] Among them, since the communication channels to be selected are mutually exclusive channels, it is only necessary to select channels other than the first communication channel from the communication channels to be selected to screen out the second communication channel that is mutually exclusive with the first communication channel.
[0077] Among them, for the communication channels to be selected in the target preferred channel list, several mutually exclusive communication channels can be selected based on the mutual exclusion principle combined with the channel score, that is, optionally, in some embodiments of the present application, the step of "determining the target preferred channel array" further includes:
[0078] Filter out a first scoring channel with the highest channel score for each frequency band network from the pre-selected channel list;
[0079] For a first scoring channel of the first frequency band network, based on the first scoring channel, at least one first target communication channel mutually exclusive with the first scoring channel is screened from the pre-selected channel list according to the preset bandwidth and the channel score;
[0080] For a first scoring channel of the second frequency band network, based on the first scoring channel and in combination with the channel score, at least one second target communication channel having a different center frequency from the first scoring channel is screened out from the pre-selected channel list;
[0081] The first scoring channel of each of the frequency band networks, as well as at least one first target communication channel of the first frequency band network and at least one second target communication channel of the second frequency band network are set as candidate communication channels, and the target preferred channel array is generated based on the candidate communication channels.
[0082] That is, the above is a process of generating a target preferred channel array based on the pre-selected channel list, that is, selecting the first scoring channel with the highest score for each frequency band network according to the channel score, and then, based on the first scoring channel, screening out channels with higher scores and mutually exclusive with the first scoring channel from the pre-selected channel list as the first target communication channel or the second target communication channel. For example, for the channel of the first frequency band network, a channel with a higher score and a frequency band that does not overlap with the first scoring channel can be selected as the first target communication channel, and for the channel of the second frequency band network, a channel with a higher score and a center frequency different from that corresponding to the first scoring channel can be selected as the second target communication channel.
[0083] It can be understood that in the embodiment of the present application, the first target communication channel and the second target communication channel may include multiple channels. For example, in the embodiment of the present application, the first target communication channel and the second target communication channel are taken as two channels, respectively. Then, the first first target communication channel is mutually exclusive with the first scoring channel and the second target communication channel of the first frequency band network, and the second first target communication channel is also mutually exclusive with the first scoring channel of the first frequency band network. For the two second target communication channels of the second frequency band network, the center frequencies of the three channels composed of the two second target communication channels and the first scoring channel of the second frequency band network are different from each other.
[0084] Among them, for the second target communication channel under the 5G frequency band, two second target communication channels can be screened from the pre-selected channel list based on the band, that is, optionally, in some embodiments of the present application, the step of "for the first scoring channel of the second frequency band network, based on the first scoring channel and combined with the channel score, screening out at least one second target communication channel with a different center frequency from the first scoring channel from the pre-selected channel list" includes:
[0085] For the second frequency band network, classify the communication channels supported by the second frequency band network into at least one frequency band according to the preset bandwidth, wherein each of the frequency bands includes at least one communication channel, and each communication channel of each frequency band shares a center frequency;
[0086] Determine a first frequency band to which the first scoring channel belongs from the at least one frequency band, and use the remaining frequency bands as second frequency bands;
[0087] In combination with the channel scores, a communication channel belonging to the second frequency band is screened out from the pre-selected channel list as a second target communication channel.
[0088] Among them, for the 5G frequency band, each band corresponds to a center frequency, so channels of different bands can be directly selected as the second target communication channel.
[0089] Among them, in the embodiment of the present application, the channel currently in use can also be recorded in the target preferred channel array, and the second communication channel can be directly screened based on the channel in use recorded in the target preferred channel array (such as corresponding to the first communication channel). For example, the target preferred channel array may include an array uBestApChannel of size 8, that is, the array uBestApChannel can store 8 elements, such as uBestApChannel[0], uBestApChannel[1], uBestApChannel[2], uBestApChannel[3], uBestApChannel[4], uBestApChannel[5], uBestApChannel[6] and uBestApChannel[7]. Among them, the data characteristics corresponding to each element are:
[0090] uBestApChannel[0]: The best channel in 2.4 GHz, that is, the 2.4 GHz channel with the highest channel score in the pre-selected channel list.
[0091] uBestApChannel[1]: The best channel for 5G, that is, the 5G channel with the highest channel score in the pre-selected channel list.
[0092] uBestApChannel[2]: the channel currently being used by the existing wireless signal, such as the first communication channel corresponding to the first communication module.
[0093] uBestApChannel[3]: The best channel among channels 1, 6, and 11 in the 2.4 GHz band.
[0094] uBestApChannel[4]: compares uBestApChannel[0] with non-overlapping channels of 20 MHz. The interval between the two channels is at least 22 MHz (20 / 2+1+20 / 2+1). uBestApChannel[4] is a 20 MHz channel compared to uBestApChannel[0].
[0095] uBestApChannel[5]: uBestApChannel[0] is used as the object for comparison and selection. Based on non-overlapping channels of 20 MHz and 40 MHz, the interval between uBestApChannel[5] and uBestApChannel[0] is at least 32 MHz (20 / 2+1+40 / 2+1). uBestApChannel[5] is a 40 MHz channel compared to uBestApChannel[0], and the bandwidth of uBestApChannel[0] is 20 MHz.
[0096] uBestApChannel[6]: compares and selects uBestApChannel[1], a 5G channel in another band.
[0097] uBestApChannel[7]: compares and selects 5G channels in other bands based on uBestApChannel[1] and uBestApChannel[6].
[0098] For the description of 5G bands, please refer to the above description of band1-band7.
[0099] From the specific content of the above target preferred channel array, we can know that the first 4 elements of the array can be directly used on a single WiFi chip, and the best channel can be directly extracted. All the elements of the array are used for dual WiFi chips. There are 3 pre-selected channels for the 2.4G band and 5G band respectively (i.e., uBestApChannel[0], uBestApChannel[4], and uBestApChannel[5] for the 2.4G band and uBestApChannel[1], uBestApChannel[6], and uBestApChannel[7] for the 5G band), which are sufficient for dual WiFi chips.
[0100] In summary, the embodiment of the present application configures a target preferred channel array based on mutually exclusive requirements, provides preferred communication channels to be selected, and speeds up the screening of the second communication channel.
[0101] In order to more clearly illustrate the details of generating the target preferred channel array in the embodiment of the present application, the process of obtaining each element of the target preferred channel data is described in the form of an overall flow. For details, please refer to Figure 5 , Figure 5: is a schematic diagram of a process for obtaining each element in a target preferred channel array provided in an embodiment of the present application. Specifically, taking the communication module as a wifi module as an example, the process specifically includes:
[0102] 111. The wifi driver traverses the pre-selected channel list from best to worst according to the channel scores;
[0103] 112. If the traversed channel is one of channel 1, channel 6 or channel 11, and uBestApChannel[3] is empty, execute step 113; otherwise, execute step 114;
[0104] 113. Assign the traversed channel to uBestApChannel[3];
[0105] If one of channel 1, channel 6 or channel 11 is traversed subsequently, uBestApChannel[3] will no longer be updated to ensure that uBestApChannel[3] is the channel with the highest score among channel 1, channel 6 or channel 11.
[0106] 114. If the traversed channel is 5G, and any one of uBestApChannel[1], uBestApChannel[6], and uBestApChannel[7] is empty, execute step 115; if the traversed channel is 2.4G, execute step 116;
[0107] 115. According to whether uBestApChannel[1], uBestApChannel[6], and uBestApChannel[7] are empty and whether the traversed channel is in the optional range, and whether the channels between uBestApChannel[1], uBestApChannel[6], and uBestApChannel[7] are mutually exclusive, determine the array element to which the traversed channel belongs;
[0108] Specifically: if uBestApChannel[1] is empty and the traversed channel is in the optional range, the traversed channel is set to the channel corresponding to uBestApChannel[1];
[0109] If uBestApChannel[1] is not empty, and uBestApChannel[6] is empty, and the traversed channel is in the optional range, and the traversed channel is mutually exclusive with the channel corresponding to uBestApChannel[1], then the traversed channel is set to the channel corresponding to uBestApChannel[6].
[0110] If uBestApChannel[1] and uBestApChannel[6] are not empty, and uBestApChannel[7] is empty, if the traversed channel is in the optional range, and the traversed channel is mutually exclusive with uBestApChannel[1] and uBestApChannel[6], then the traversed channel is set to the channel corresponding to uBestApChannel[7].
[0111] 116. Determine the array element to which the traversed channel belongs based on whether uBestApChannel[0], uBestApChannel[4], and uBestApChannel[5] are empty, whether the traversed channel is in the optional range, whether uBestApChannel[4] and uBestApChannel[0] are mutually exclusive, and whether the channels between uBestApChannel[5] and uBestApChannel[0] are mutually exclusive;
[0112] Specifically: if uBestApChannel[0] is empty and the traversed channel is within the optional range, the traversed channel is set to the channel corresponding to uBestApChannel[0];
[0113] If uBestApChannel[0] is not empty, and uBestApChannel[4] is empty, and the traversed channel is within the optional range, and the interval between the traversed channel and the channel corresponding to uBestApChannel[0] is not less than 22 MHz, then the traversed channel is set as the channel of uBestApChannel[4];
[0114] If uBestApChannel[0] and uBestApChannel[4] are not empty, and uBestApChannel[5] is empty, and the traversed channel is within the optional range, and the interval between the traversed channel and the channel corresponding to uBestApChannel[0] is not less than 32 MHz, then the traversed channel is set as the channel of uBestApChannel[5].
[0115] 117. If uBestApChannel[0], uBestApChannel[1], uBestApChannel[3], uBestApChannel[4], uBestApChannel[5], uBestApChannel[6] and uBestApChannel[7] have all acquired corresponding channels, execute step 119; otherwise, execute step 118;
[0116] 118. Determine whether an unreasonable channel has been traversed. If so, execute step 119. Otherwise, return to execute step 111.
[0117] 119. Assign the channel currently being used by the existing wireless signal to uBestApChannel[2] to obtain a complete target preferred channel array.
[0118] Among them, the optional range mainly refers to whether the channel does not belong to a radar channel, such as a radar DFS channel, wherein the radar channel is a channel specially provided for radar signals and is not an object for selecting mutually exclusive channels in the embodiment of the present application.
[0119] Finally, the selected channels include three 2.4G channels, of which the distances between the last two 2.4G channels and the first channel are 22MHz and 32MHz respectively, and they are mutually exclusive. There are also three 5G channels, each of which is in a different band to ensure that they are mutually exclusive. In addition to these six channels, there is a uBestApChannel[2], which is used for other purposes, and a channel in use (such as the sta channel).
[0120] Among them, in the embodiment of the present application, the same communication module may also include multiple communication modes, such as a wifi module including two communication modes of sta and p2p. The embodiment of the present application takes the two communication modes on the same communication module sharing the same channel as an example, then the second communication module includes a communication module supporting at least two communication modes, and at least one of the at least two communication modes does not match the communication channel;
[0121] The step of "selecting a second communication channel which is mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module" includes:
[0122] If the at least two communication modes include at least one target communication mode that has a matched communication channel, setting a third target communication channel matched by the target communication mode to a communication channel of another communication mode among the at least two communication modes except the target communication mode;
[0123] If the at least two communication modes do not include any target communication mode with a matched communication channel, a second communication channel mutually exclusive with the first communication channel is screened out from the pre-selected channel list according to the first communication channel matched by the first communication module.
[0124] For example, if the STA channel in the WiFi module is known and the P2P channel is unknown, the STA channel is allocated to the P2P.
[0125] Specifically, the embodiment of the present application takes an example in which a communication device includes two WiFi modules (WiFi chips), and one of the WiFi modules supports STA communication mode and P2P communication mode, and the other WiFi module supports AP mode (indicating a hotspot, for example, using a mobile phone to turn on the hotspot means turning on its AP function), wherein the STA communication mode includes WiFi scanning and connection functions; the P2P communication mode includes point-to-point communication or WiFi direct connection, and the embodiment of the present application represents the communication method used by the Miracast screen projection function, wherein the function of Miracast is to share video images wirelessly, for example, a mobile phone can play videos or photos directly on a TV or other devices through Miracast without any connecting wires, and most mobile phones will have this function; the AP mode indicates a hotspot, for example, using a mobile phone to turn on the hotspot means turning on its AP function.
[0126] The channel selection for each communication mode is as follows:
[0127] 1. Channel selection for sta communication mode:
[0128] Since the channel priority of the STA function is the highest, and its channel is determined by the hotspot in the environment, if it is connected to a hotspot, the channel value is consistent with the hotspot.
[0129] 2. Channel selection for AP communication mode:
[0130] (1) First, obtain the target preferred channel array uBestApChannel from the wifi driver through netlink, where uBestApChannel[2] means the channel where the current sta is located.
[0131] (2) If the STA function does not have a channel, it means that the STA function is not turned on, so obtain the p2p channel again.
[0132] (3) If the p2p function does not have a channel, it means that the p2p function is not turned on. Then set the 2.4 / 5g AP channel equal to the channels corresponding to the first two elements of the uBestApChannel array, and then turn on the AP on the corresponding 2.4g / 5g channel according to the selection of the user interface.
[0133] (4) If the sta or p2p function has a channel, determine whether the corresponding values of index values 0, 1, 4, 5, 6, and 7 in the array uBestApChannel are mutually exclusive with the sta / p2p channel. If the mutual exclusion condition is met, assign a value of 2.4G / 5G to the corresponding AP channel, and then start the AP on the corresponding 2.4G / 5G channel according to the selection of the user interface.
[0134] For details, please refer to Figure 6 , Figure 6 It is a flow chart of AP channel selection provided in an embodiment of the present application, wherein uBestApChannel_2G is a 2.4G channel obtained by screening from the target preferred channel array (that is, the best channel list) when the AP is 2.4G, and uBestApChannel_5G is a 5G channel obtained by screening from the target preferred channel array (that is, the best channel list) when the AP is 5G.
[0135] 3. Channel selection for p2p communication mode:
[0136] (1) First, obtain the target preferred channel array uBestApChannel from the wifi driver through netlink, where uBestApChannel[2] means the channel where the current sta is located.
[0137] (2) If the STA function has a channel, then according to the hardware design of STA and P2P on the same WiFi chip, set the P2P channel to be equal to the STA channel.
[0138] (3) If the STA function does not have a channel, it means that the STA function is not turned on, so get the AP channel again
[0139] (4) If the AP function does not have a channel, it means that the AP function is not turned on, then the 2.4 / 5g p2p channels are set equal to the first two elements of the uBestApChannel array.
[0140] (5) If the AP function has a channel, determine whether the corresponding values of index values 0, 1, 4, 5, 6, and 7 in the array uBestApChannel are mutually exclusive with the AP channel. If the mutual exclusion condition is met, assign values to the corresponding uBestApChannel_2G / uBestApChannel_5G, and then use these two values to set the AP negotiation information.
[0141] For details, please refer to Figure 7 , Figure 7 It is a flow chart of p2p channel selection provided in an embodiment of the present application, wherein uBestApChannel_2G is a 2.4G channel obtained by screening from the target preferred channel array (that is, the best channel list) when the ap is 2.4G, and uBestApChannel_5G is a 5G channel obtained by screening from the target preferred channel array (that is, the best channel list) when the ap is 5G.
[0142] In summary, the design scheme of supporting dual communication modules in the embodiment of the present application involves modifications to the Android architecture. Figure 8 , Figure 8 It is a schematic diagram of the Android architecture provided by an embodiment of the present application, which mainly involves modifications to the HAL layer and the kernel layer. Specifically, the modifications to the HAL layer mainly include wpa_supplicant and hostapd, and the kernel layer modifies the wifidriver, wherein the wifi driver provides a mutually exclusive channel array to wpa_supplicant and hostapd, and wpa_supplicant and hostapd select channels based on the mutually exclusive channel array.
[0143] Among them, hostapd / wpa_supplicant are the underlying software for operating ap and sta / p2p functions respectively. The HAL layer is a unique mechanism that cannot be avoided in the underlying development of the Android system, and is a bridge for the upper layer of the operating system and the hardware driver to communicate. The kernel layer is the kernel of the Android system, and is a software structure that can operate peripheral hardware. The wifi driver is the driver of the wifi chip, which can directly control the various functions of the wifi chip. Hardware is the hardware layer of the Android system, such as the wifi chip (chip) is in this layer. System Service is the service layer of the Android system. Netlink is the underlying communication method of the system kernel, and is the interface for network applications to communicate with the kernel. SoftApManeger / WifiManager / WifiP2pManager belong to the wireless service of the Android architecture, and manage ap / sta / p2p functions respectively. Setting is a management apk for an Android device. Taking a mobile phone as an example, the setting function of the mobile phone corresponds to setting.
[0144] In summary, the embodiment of the present application is a supplement to the original wifi driver's method of obtaining the best channel based on the pre-selected channel list and the channel score, and is specially adapted for the dual communication module (such as dual wifi chip) solution. It can effectively avoid the mutual interference between the two communication modules.
[0145] In the multi-communication module scenario, the embodiment of the present application implements channel allocation and communication in the multi-communication module scenario by screening mutually exclusive communication channels for communication, thereby solving the defect that the existing channel screening scheme is only applicable to a single communication module. Among them, by further screening the communication channels that support simultaneous communication of multiple communication modules on the basis of the pre-selected channel list screened based on the channel score, the effectiveness of the screened communication channels is improved and the communication quality of the device is improved.
[0146] In order to better implement the device communication method of the present application, the present application also provides a device communication apparatus based on the device communication method. The meanings of the terms are the same as those in the device communication method, and the specific implementation details can refer to the description in the method embodiment.
[0147] See also Fig. 9 , Fig. 9 : is a schematic diagram of the structure of a device communication device provided in an embodiment of the present application, wherein the device communication device is applied to a communication device, the communication device includes a communication module, and the device communication device can be specifically as follows:
[0148] An acquisition module 201 is used to acquire a pre-selected channel list, where the pre-selected channel list is obtained by screening based on channel scores;
[0149] An identification module 202, configured to identify a first communication module that has matched a communication channel and a second communication module that has not matched a communication channel from the communication modules if the communication modules include at least two;
[0150] A screening module 203, configured to screen out a second communication channel mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module;
[0151] The communication module 204 is configured to communicate via the first communication module based on the first communication channel and via the second communication module based on the second communication channel.
[0152] Optionally, in some embodiments of the present application, the filtering out a second communication channel that is mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module includes:
[0153] Determining a first communication channel that has been matched by the first communication module;
[0154] If the first communication channel is a first frequency band network, selecting a second communication channel from the pre-selected channel list that does not overlap with the frequency band of the first communication channel;
[0155] If the second communication channel is a second frequency band network, a second communication channel having a center frequency different from that of the first communication channel is screened out from the pre-selected channel list.
[0156] Optionally, in some embodiments of the present application, the filtering out a second communication channel that is mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module includes:
[0157] Determine a target preferred channel array, wherein the target preferred channel array includes at least two mutually exclusive communication channels to be selected, and the communication channels to be selected are obtained by performing mutually exclusive screening on the communication channels in the pre-selected channel list;
[0158] A second communication channel mutually exclusive with the first communication channel is screened out from the candidate communication channels according to the first communication channel matched by the first communication module.
[0159] Optionally, in some embodiments of the present application, the step of selecting a second communication channel that is mutually exclusive with the first communication channel from the selected communication channels according to the first communication channel matched by the first communication module includes:
[0160] Determining a first communication channel that has been matched by the first communication module;
[0161] The other communication channels among the communication channels to be selected except the first communication channel are set as second communication channels.
[0162] Optionally, in some embodiments of the present application, before determining the target preferred channel array, the method further includes:
[0163] Filter out a first scoring channel with the highest channel score for each frequency band network from the pre-selected channel list;
[0164] For a first scoring channel of the first frequency band network, based on the first scoring channel, at least one first target communication channel mutually exclusive with the first scoring channel is screened from the pre-selected channel list according to the preset bandwidth and the channel score;
[0165] For a first scoring channel of the second frequency band network, based on the first scoring channel and in combination with the channel score, at least one second target communication channel having a different center frequency from the first scoring channel is screened out from the pre-selected channel list;
[0166] The first scoring channel of each of the frequency band networks, as well as at least one first target communication channel of the first frequency band network and at least one second target communication channel of the second frequency band network are set as candidate communication channels, and the target preferred channel array is generated based on the candidate communication channels.
[0167] Optionally, in some embodiments of the present application, the first scoring channel for the second frequency band network, based on the first scoring channel and in combination with the channel score, screens out at least one second target communication channel with a center frequency different from that of the first scoring channel from the pre-selected channel list, including:
[0168] For the second frequency band network, classify the communication channels supported by the second frequency band network into at least one frequency band according to the preset bandwidth, wherein each of the frequency bands includes at least one communication channel, and each communication channel of each frequency band shares a center frequency;
[0169] Determine a first frequency band to which the first scoring channel belongs from the at least one frequency band, and use the remaining frequency bands as second frequency bands;
[0170] In combination with the channel scores, a communication channel belonging to the second frequency band is screened out from the pre-selected channel list as a second target communication channel.
[0171] Optionally, in some embodiments of the present application, the second communication module includes a communication module supporting at least two communication modes, and at least one communication mode of the at least two communication modes does not match the communication channel;
[0172] The step of selecting, from the pre-selected channel list, a second communication channel mutually exclusive with the first communication channel according to the first communication channel matched by the first communication module, comprises:
[0173] If the at least two communication modes include at least one target communication mode that has a matched communication channel, setting a third target communication channel matched by the target communication mode to a communication channel of another communication mode among the at least two communication modes except the target communication mode;
[0174] If the at least two communication modes do not include any target communication mode with a matched communication channel, a second communication channel mutually exclusive with the first communication channel is screened out from the pre-selected channel list according to the first communication channel matched by the first communication module.
[0175] In the embodiment of the present application, the acquisition module 201 acquires a pre-selected channel list, and the pre-selected channel list is obtained based on channel score screening. The identification module 202 identifies a first communication module with a matched communication channel and a second communication module with an unmatched communication channel from the communication modules if the communication modules include at least two. The screening module 203 screens out a second communication channel that is mutually exclusive with the first communication channel from the pre-selected channel list based on the first communication channel matched by the first communication module. The communication module 204 communicates based on the first communication channel through the first communication module and based on the second communication channel through the second communication module.
[0176] Among them, the embodiment of the present application realizes channel allocation and communication in a multi-communication module scenario by screening mutually exclusive communication channels for communication in a multi-communication module scenario, and solves the defect that the existing channel screening scheme is only applicable to a single communication module. Among them, by further screening the communication channels that support simultaneous communication of multiple communication modules on the basis of the pre-selected channel list screened based on channel score, the effectiveness of the screened communication channels is improved and the communication quality of the device is improved.
[0177] In addition, the present application also provides an electronic device, such as Fig.10 As shown, it shows a schematic diagram of the structure of the electronic device involved in this application, specifically:
[0178] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0179] The processor 301 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 301.
[0180] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0181] The electronic device also includes a power supply 303 for supplying power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 303 can also include any components such as one or more DC or AC power supplies, recharging systems, power supply device debugging circuits, power converters or inverters, and power status indicators.
[0182] The electronic device may further include an input unit 304, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0183] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 301 in the electronic device will load the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application program stored in the memory 302, thereby implementing the steps in any device communication method provided in the embodiments of the present application.
[0184] The communication device of an embodiment of the present application obtains a pre-selected channel list, which is obtained based on channel score screening. If the communication module includes at least two, a first communication module with a matched communication channel and a second communication module with an unmatched communication channel are identified from the communication module, and a second communication channel that is mutually exclusive with the first communication channel is screened from the pre-selected channel list based on the first communication channel matched by the first communication module, and communication is performed through the first communication module based on the first communication channel and through the second communication module based on the second communication channel.
[0185] Among them, the embodiment of the present application realizes channel allocation and communication in a multi-communication module scenario by screening mutually exclusive communication channels for communication in a multi-communication module scenario, and solves the defect that the existing channel screening scheme is only applicable to a single communication module. Among them, by further screening the communication channels that support simultaneous communication of multiple communication modules on the basis of the pre-selected channel list screened based on channel score, the effectiveness of the screened communication channels is improved and the communication quality of the device is improved.
[0186] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0187] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0188] To this end, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any device communication method provided in the present application.
[0189] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0190] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0191] Since the instructions stored in the computer-readable storage medium can execute the steps in any device communication method provided in the present application, the beneficial effects that can be achieved by any device communication method provided in the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0192] The above is a detailed introduction to a device communication method, apparatus, electronic device and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A device communication method, characterized in that: Applied to a communication device, the communication device includes a communication module, and the method includes: Obtaining a pre-selected channel list, wherein the pre-selected channel list is obtained by screening based on channel scores; If the communication modules include at least two, identifying a first communication module that has matched the communication channel and a second communication module that has not matched the communication channel from the communication modules; Filtering out a second communication channel mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module; Communication is performed through the first communication module based on the first communication channel, and through the second communication module based on the second communication channel.
2. The device communication method according to claim 1, characterized in that: The step of selecting, from the pre-selected channel list, a second communication channel mutually exclusive with the first communication channel according to the first communication channel matched by the first communication module, comprises: Determining a first communication channel that has been matched by the first communication module; If the first communication channel is a first frequency band network, selecting a second communication channel from the pre-selected channel list that does not overlap with the frequency band of the first communication channel; If the second communication channel is a second frequency band network, a second communication channel having a center frequency different from that of the first communication channel is screened out from the pre-selected channel list.
3. The device communication method according to claim 1, characterized in that: The step of selecting, from the pre-selected channel list, a second communication channel mutually exclusive with the first communication channel according to the first communication channel matched by the first communication module, comprises: Determine a target preferred channel array, wherein the target preferred channel array includes at least two mutually exclusive communication channels to be selected, and the communication channels to be selected are obtained by performing mutually exclusive screening on the communication channels in the pre-selected channel list; A second communication channel mutually exclusive with the first communication channel is screened out from the candidate communication channels according to the first communication channel matched by the first communication module.
4. The device communication method according to claim 3, characterized in that: The step of selecting a second communication channel which is mutually exclusive with the first communication channel from the selected communication channels according to the first communication channel matched by the first communication module includes: Determining a first communication channel that has been matched by the first communication module; The other communication channels among the communication channels to be selected except the first communication channel are set as second communication channels.
5. The device communication method according to claim 3, characterized in that: Before determining the target preferred channel array, the method further includes: Filter out a first scoring channel with the highest channel score for each frequency band network from the pre-selected channel list; For a first scoring channel of the first frequency band network, based on the first scoring channel, at least one first target communication channel mutually exclusive with the first scoring channel is screened from the pre-selected channel list according to the preset bandwidth and the channel score; For a first scoring channel of the second frequency band network, based on the first scoring channel and in combination with the channel score, at least one second target communication channel having a different center frequency from the first scoring channel is screened out from the pre-selected channel list; The first scoring channel of each of the frequency band networks, as well as at least one first target communication channel of the first frequency band network and at least one second target communication channel of the second frequency band network are set as candidate communication channels, and the target preferred channel array is generated based on the candidate communication channels.
6. The device communication method according to claim 5, characterized in that: The first scoring channel for the second frequency band network, based on the first scoring channel and in combination with the channel score, selects at least one second target communication channel from the pre-selected channel list that has a different center frequency from the first scoring channel, comprising: For the second frequency band network, classify the communication channels supported by the second frequency band network into at least one frequency band according to the preset bandwidth, wherein each of the frequency bands includes at least one communication channel, and each communication channel of each frequency band shares a center frequency; Determine a first frequency band to which the first scoring channel belongs from the at least one frequency band, and use the remaining frequency bands as second frequency bands; In combination with the channel scores, a communication channel belonging to the second frequency band is screened out from the pre-selected channel list as a second target communication channel.
7. The device communication method according to claim 1, characterized in that: The second communication module includes a communication module supporting at least two communication modes, and at least one communication mode of the at least two communication modes does not match the communication channel; The step of selecting, from the pre-selected channel list, a second communication channel mutually exclusive with the first communication channel according to the first communication channel matched by the first communication module, comprises: If the at least two communication modes include at least one target communication mode that has a matched communication channel, setting a third target communication channel matched by the target communication mode to a communication channel of another communication mode among the at least two communication modes except the target communication mode; If the at least two communication modes do not include any target communication mode with a matched communication channel, a second communication channel mutually exclusive with the first communication channel is screened out from the pre-selected channel list according to the first communication channel matched by the first communication module.
8. A device communication apparatus, characterized in that: Applied to a communication device, the communication device includes a communication module, and the device includes: An acquisition module, used to acquire a pre-selected channel list, wherein the pre-selected channel list is obtained by screening based on channel scores; an identification module, configured to identify, if the communication modules include at least two, a first communication module that has matched the communication channel and a second communication module that has not matched the communication channel from the communication modules; A screening module, configured to screen out a second communication channel mutually exclusive with the first communication channel from the pre-selected channel list according to the first communication channel matched by the first communication module; A communication module is used to communicate based on the first communication channel through the first communication module and based on the second communication channel through the second communication module.
9. An electronic device, characterized in that: The device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the device communication method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the device communication method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Channel selection method and device, and electronic equipment
CN108668378A
Hotspot channel generation method, computing device and readable storage medium
CN115334514A
Channel selection method and device, equipment and storage medium
CN115696477A
Channel selection method and device, electronic equipment and computer readable storage medium
CN118382146A
Data transmission method and device, equipment, storage medium and program product
CN119031487A