Communication method, electronic equipment and storage medium

By establishing a P2P channel on the dynamic frequency selection channel, frequent handover problems caused by different channels between terminal devices are solved, and user experience and channel performance are improved.

CN119325075APending Publication Date: 2025-01-17HONOR DEVICE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310877207.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-17
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The channel between terminal devices is different from wireless routers and other terminal devices, resulting in frequent switching, causing screen lag and delay in scenarios such as screen projection, affecting the user experience.

Method used

By determining whether the terminal device supports point-to-point communication in a dynamic frequency selection channel, if supported, a P2P channel is established on the channel to ensure that the channel between at least one end device and the wireless access access device and the P2P channel between the terminal device is the same as that between the channel and the wireless access access device and the P2P channel between the terminal device. , reduce channel switching.

Benefits of technology

It effectively reduces the time-sharing switching scenarios of terminal devices between different channels, increases the time for P2P channels to transmit data, and improves user experience and channel transmission performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119325075A_ABST
    Figure CN119325075A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a communication method, electronic equipment and a storage medium. The communication method comprises the following steps: when a first terminal device is connected with a first wireless access device based on a first channel (such as a dynamic frequency selection channel), judging whether the configurations of the first terminal device and a second terminal device both support point-to-point communication in the first channel; and when it is determined that point-to-point communication establishment is supported in the first channel, point-to-point communication between the two terminal devices can be established based on the first channel of the access network. Based on the above scheme, it can be ensured that a channel for communication between at least one terminal device and the wireless access device is the same as a channel for point-to-point communication between two terminal devices, so that occurrence of time-sharing switching scenes of the terminal devices among different channels is effectively reduced, the point-to-point channel data transmission time is increased, and the user experience is improved. Phenomena such as picture lagging are avoided, and the user experience is improved.
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 communication method, electronic equipment and storage medium. Background Art

[0002] Currently, terminal devices (such as mobile phones and tablets) can directly exchange information based on peer-to-peer (P2P) technology to share computing resources and services. P2P technology refers to the transmission of information between two terminal devices directly through a channel without the intervention of an intermediate link or server. For example, Figure 1 As shown, the mobile phone 101 and the computer 102 can use P2P technology to project screens and share computing resources.

[0003] At present, there are some situations where the channel for communication between the terminal device and the wireless router is different from the channel for P2P communication between two terminal devices, resulting in the need for the terminal device to perform time-sharing transmission between two different channels. For example, the data sending end device can transmit data with the wireless router within a preset first time period, and will switch to the P2P channel to perform P2P data transmission with the data receiving end device within a preset second time period, and will switch to the channel for communication with the wireless router again within a preset third time period. The switching of the terminal device between different channels results in a shorter time slice for P2P data transmission between terminal devices. For example, in the screen projection scenario, it is necessary to wait until the time slice of P2P data transmission between the two terminal devices corresponds to each other before the screen projection data can be transmitted, which can easily cause freezes and delays in the projection screen, affecting the user experience. Summary of the invention

[0004] To solve the above problems, the present application provides a communication method, an electronic device and a storage medium.

[0005] In a first aspect, the present application provides a communication method, the method comprising: a first terminal device is connected to a first wireless access device based on a first channel; the first terminal device receives a first instruction to establish a point-to-point communication connection with a second terminal device; it is determined that both the first terminal device and the second terminal device support point-to-point communication based on the first channel; and point-to-point communication between the first terminal device and the second terminal device is established based on the above-mentioned first channel.

[0006] In the present application, the first channel may be any channel in the Dynamic Frequency Selection (DFS) channel; the first instruction may be the indication information for point-to-point communication received by the first terminal device during the device discovery process and received by the second terminal device. For example, if the first terminal device is a computer and the second terminal device is a mobile phone, the first instruction may be a request frame sent by the mobile phone to the computer after the screen projection of the mobile phone is turned on; the first terminal device may be any electronic device such as a mobile phone, a tablet, a computer, a virtual reality (VR) device, a wearable device, an augmented reality (AR) device, etc.; the first wireless access device may be a wireless router, a wireless access point, etc. mentioned later; the second terminal device may be any electronic device such as a mobile phone, a tablet, a computer, a VR device, a wearable device, an AR device, etc.

[0007] It can be understood that in the present application, when the first terminal device has accessed the wireless network based on the first channel, it is necessary to determine whether the configurations of the first terminal device and the second terminal device both support point-to-point communication (i.e., P2P communication) on the first channel. When it is determined that the configurations of the first terminal device and the second terminal device both support the creation of P2P communication on the first channel, a P2P channel between the two terminal devices can be established based on the first channel of the above-mentioned access network.

[0008] Based on the above scheme, it can be ensured that the channel for communication between at least one end device and the wireless access device is the same as the channel for P2P communication between two terminal devices, thereby effectively reducing the occurrence of time-sharing switching scenarios between different channels of terminal devices, increasing the time for P2P channel data transmission, avoiding screen freezes and other phenomena, and improving user experience.

[0009] In a possible implementation, the first channel is a dynamic frequency selection channel.

[0010] In this application, DFS channels are multiple channels with automatic switching function under the 5GHz wireless frequency band. When the device is connected to the DFS channel under the 5GHz frequency band, when a radar signal is detected in one of the channels, it can automatically switch to other channels to avoid interference from the radar signal.

[0011] It can be understood that, in the present application, the first channel can be any channel in the DFS channel.

[0012] It can be understood that in the present application, the first terminal device can be connected to the first wireless access device based on any channel in the DFS channel to access the wireless network.

[0013] In a possible implementation, the method further includes: if it is determined that the first terminal device or the second terminal device does not support point-to-point communication based on the first channel, and it is determined that the second terminal device is connected to the second wireless access device based on the second channel, wherein the second channel includes any channel in the non-dynamic frequency selection channel; establishing point-to-point communication between the first terminal device and the second terminal device based on the second channel.

[0014] In the present application, the first channel may be any channel in the DFS channels; the second channel may be any channel in the non-DFS channels.

[0015] It can be understood that in the present application, when it is determined that the first terminal device is connected to the first wireless access device based on any channel in the DFS channel, and it is determined that the configuration of the first terminal device or the second terminal device does not support the creation of P2P communication on the first channel, it is necessary to judge the wireless network connection status of the second terminal device. If it is determined that the second terminal device is connected to the second wireless access device based on any channel in the non-DFS channel, P2P communication between the two terminal devices can be established based on the non-DFS channel. In this way, it can be ensured that the channel for communication between the second terminal device and the wireless access device is the same as the channel for P2P communication between the two terminal devices, thereby avoiding the occurrence of the scenario of time-sharing switching between different channels of the second terminal device, and improving the channel transmission performance and user experience.

[0016] In a possible implementation, the method also includes: if it is determined that the first terminal device or the second terminal device does not support point-to-point communication based on the first channel, and it is determined that the second terminal device is connected to the second wireless access device based on a third channel, wherein the third channel is a dynamic frequency selection channel; then establishing point-to-point communication between the first terminal device and the second terminal device based on a fourth channel, wherein the fourth channel includes any channel in the non-dynamic frequency selection channel.

[0017] In the present application, the first channel may be any channel in the DFS channels; the third channel may be any channel in the DFS channels; and the fourth channel may be any channel in the non-DFS channels.

[0018] It can be understood that in the present application, when it is determined that the first terminal device is connected to the first wireless access device based on any channel in the DFS channel, and at the same time it is determined that the configuration of the first terminal device or the second terminal device does not support the creation of P2P communication on the first channel, it is necessary to judge the wireless network connection status of the second terminal device. If it is determined that the second terminal device is connected to the second wireless access device based on any channel in the DFS channel, P2P communication between the two terminal devices can be established based on the fourth channel, that is, any channel in the non-DFS channel (for example, channel 149 configured by default by the system).

[0019] In a possible implementation, the method also includes: if it is determined that the first terminal device or the second terminal device does not support point-to-point communication based on the first channel, and it is determined that the second terminal device is not connected to the second wireless access device; establishing point-to-point communication between the first terminal device and the second terminal device based on a fourth channel, wherein the fourth channel includes any channel in the non-dynamic frequency selection channel.

[0020] In the present application, the first channel may be any channel in the DFS channels; and the fourth channel may be any channel in the non-DFS channels.

[0021] It can be understood that in the present application, when it is determined that the first terminal device is connected to the first wireless access device based on any channel in the DFS channel, and at the same time it is determined that the configuration of the first terminal device or the second terminal device does not support the creation of P2P communication on the first channel, it is necessary to judge the wireless network connection status of the second terminal device. If it is determined that the second terminal device is not connected to the second wireless access device, P2P communication between the two terminal devices can be established based on the fourth channel, i.e., any channel in the non-DFS channel (for example, channel 149 configured by default by the system).

[0022] In a possible implementation, the method further includes: the first terminal device is not connected to the first wireless access device; if it is determined that the second terminal device is connected to the second wireless access device based on a second channel, wherein the second channel includes any channel in a non-DFS channel; point-to-point communication between the first terminal device and the second terminal device is established based on the second channel.

[0023] In the present application, the second channel may be any channel of the non-DFS channels.

[0024] It can be understood that in this application, when it is determined that the first terminal device is not connected to the first wireless access device to access the wireless network, it is necessary to judge the wireless network connection status of the second terminal device. If it is determined that the second terminal device is connected to the second wireless access device based on any channel in the non-DFS channel, P2P communication between the two terminal devices can be established based on the non-DFS channel. In this way, the first terminal device is a single-channel communication, and the channel for communication between the second terminal device and the second wireless access device is the same as the channel for P2P communication between the two terminal devices, which can avoid time-sharing switching between different channels between the first terminal device and the second terminal device, effectively reduce the occurrence of time-sharing multiplexing scenarios, and improve channel transmission performance and user experience.

[0025] In a possible implementation, the method also includes: the first terminal device is not connected to the first wireless access device; if it is determined that the second terminal device is connected to the second wireless access device based on a third channel, and it is determined that both the first terminal device and the second terminal device support point-to-point communication based on the third channel, wherein the third channel is a dynamic frequency selection channel; point-to-point communication between the first terminal device and the second terminal device is established based on the third channel.

[0026] In the present application, the third channel may be any channel in the DFS channels.

[0027] It can be understood that in the present application, when it is determined that the first terminal device is not connected to the first wireless access device to access the wireless network, it is necessary to judge the wireless network connection status of the second terminal device. If it is determined that the second terminal device is connected to the second wireless access device based on any channel in the DFS channel, it is necessary to judge whether the configurations of the first terminal device and the second terminal device both support point-to-point communication (i.e., P2P communication) on the third channel. When it is determined that the configurations of the first terminal device and the second terminal device both support the creation of P2P communication on the third channel, a P2P channel between the two terminal devices can be established based on the third channel of the second terminal device accessing the network.

[0028] Based on the above solution, the first terminal device uses a single-channel communication, and the channel for communication between the second terminal device and the wireless access device is the same as the channel for P2P communication between the two terminal devices. This can avoid time-sharing switching between different channels between the first terminal device and the second terminal device, effectively reduce the occurrence of time-sharing multiplexing scenarios, and improve channel transmission performance and user experience.

[0029] In a possible implementation, the method also includes: the first terminal device is not connected to the first wireless access device; if it is determined that the second terminal device is connected to the second wireless access device based on a third channel, and it is determined that the first terminal device or the second terminal device does not support point-to-point communication based on the third channel, wherein the third channel is a dynamic frequency selection channel; establishing point-to-point communication between the first terminal device and the second terminal device based on a fourth channel, wherein the fourth channel includes any channel in the non-dynamic frequency selection channel.

[0030] In the present application, the third channel may be any channel in the DFS channels; and the fourth channel may be any channel in the non-DFS channels.

[0031] It can be understood that in the present application, when it is determined that the first terminal device is not connected to the first wireless access device to access the wireless network, it is necessary to judge the wireless network connection status of the second terminal device. If it is determined that the second terminal device is connected to the second wireless access device based on any channel in the DFS channel, it is necessary to judge whether the configurations of the first terminal device and the second terminal device both support P2P communication on the third channel. When it is determined that the configuration of the first terminal device or the second terminal device does not support the creation of P2P communication on the third channel, a P2P channel between the two terminal devices can be established based on the fourth channel, i.e., any channel in the non-DFS channel.

[0032] In a possible implementation, the method further includes: the first terminal device is not connected to the first wireless access device; if it is determined that the second terminal device is not connected to the second wireless access device; establishing point-to-point communication between the first terminal device and the second terminal device based on a fourth channel, wherein the fourth channel includes any channel in a non-dynamic frequency selection channel.

[0033] In the present application, the fourth channel may be any channel of the non-DFS channels.

[0034] It can be understood that in the present application, when it is determined that the first terminal device is not connected to the first wireless access device to access the wireless network, it is necessary to judge the wireless network connection status of the second terminal device. If it is also determined that the second terminal device is not connected to the second wireless access device, P2P communication between the two terminal devices can be established based on the fourth channel, i.e., any channel in the non-DFS channel (for example, channel 149 configured by default in the system).

[0035] In a possible implementation, the method further includes: if the first terminal device is connected to the first wireless access device based on the fifth channel; establishing point-to-point communication between the first terminal device and the second terminal device based on the fifth channel, wherein the fifth channel includes any channel in the non-dynamic frequency selection channel.

[0036] In the present application, the fifth channel may be any channel of the non-DFS channels.

[0037] It can be understood that in the present application, when it is determined that the first terminal device is connected to the first wireless access device based on any channel in the non-DFS channel, there is no need to judge the configuration of the first terminal device and the second terminal device, and the P2P communication between the first terminal device and the second terminal device can be directly established based on the fifth channel. In this way, it can be ensured that the channel for communication between at least one end device and the wireless access device is the same as the channel for P2P communication between the two terminal devices, thereby effectively reducing the occurrence of time-sharing switching scenarios between different channels of the terminal device, and improving the channel transmission performance and user experience.

[0038] In a possible implementation, the first terminal device is a group owner device, and the second terminal device is a group client device.

[0039] In the present application, the first terminal device may be a master device group owner (Group Owner, GO), and the second terminal device may be a slave device group client (Group Client, GC).

[0040] It can be understood that in the present application, when the first terminal device and the second terminal device perform point-to-point communication, the role of GO is similar to that of a wireless access device, GC implements the functions of the terminal device, and GC connects to GO similarly to the terminal device connecting to a wireless router.

[0041] In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, and is used to execute the communication method mentioned in the present application.

[0042] In a third aspect, the present application provides a readable storage medium, wherein the readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the communication method mentioned in the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 According to some embodiments of the present application, a schematic diagram of a screen projection scenario is shown;

[0044] Figure 2A According to some embodiments of the present application, a schematic diagram of a single-ended same-frequency different-channel scenario is shown;

[0045] Figure 2B According to some embodiments of the present application, a schematic diagram of a scenario of time-division multiplexing of a first terminal device is shown;

[0046] Figure 3A According to some embodiments of the present application, a schematic diagram of a scenario of two-end same-frequency different-channel is shown;

[0047] Figure 3B According to some embodiments of the present application, a schematic diagram of a scenario of time-division multiplexing of a second terminal device is shown;

[0048] Figure 3C According to some embodiments of the present application, a schematic diagram of a scenario of time-division multiplexing of a third terminal device is shown;

[0049] Figure 4A According to some embodiments of the present application, a schematic diagram of a first P2P communication scenario is shown;

[0050] Figure 4B According to some embodiments of the present application, a schematic diagram of a second P2P communication scenario is shown;

[0051] Figure 5 According to some embodiments of the present application, a schematic diagram of the hardware structure of a terminal device is shown;

[0052] Figure 6 According to some embodiments of the present application, a flow chart of a first method of establishing a P2P channel is shown;

[0053] Figure 7 According to some embodiments of the present application, a second flow chart of establishing a P2P channel is shown. DETAILED DESCRIPTION

[0054] The illustrative embodiments of the present application include, but are not limited to, a communication method, an electronic device, and a storage medium.

[0055] In order to more clearly understand the solution of the present application, the relevant field terms involved in the present application are first explained.

[0056] Channel: refers to the channel through which signals are transmitted in a communication system, which is composed of the transmission medium through which signals are transmitted from the transmitter to the receiver. Taking Wireless Fidelity (WiFi) as an example, each frequency band commonly used by WiFi is divided into multiple channels. For example, according to the IEEE 802.11 protocol, the 2.4GHz WiFi band is divided into 13 overlapping channels, each with a width of 22MHz, and the 5GHz WiFi band is divided into 201 channels.

[0057] P2P: An end-to-end communication technology that communicates in a peer-to-peer manner without distinguishing between clients and servers. The resources and services in the network are dispersed across all nodes. The transmission of information and the implementation of services are carried out directly between nodes without the intervention of intermediate links and servers. For example, the first terminal device and the second terminal device can directly transmit data based on P2P technology.

[0058] Dynamic Frequency Selection (DFS) channel: DFS channels are multiple channels with automatic switching function in the 5GHz wireless frequency band. When a device is connected to a DFS channel in the 5GHz band and a radar signal is detected in one of the channels, it can automatically switch to other channels to avoid interference from the radar signal.

[0059] The following is a brief description of the application background of the method provided in the embodiment of the present application.

[0060] At present, there are some situations where the channel for communication between the terminal device and the wireless router (i.e., the station (STA) channel) is different from the channel for P2P communication between two terminal devices, resulting in the need for the terminal device to perform time-sharing transmission between two different channels. For example, the time-sharing mode is 25ms / 25ms time-sharing, and the switching takes 5ms, which means that after the terminal device works on the STA channel for 25ms, it will switch to the P2P channel to transmit data with another terminal device, where the switching process takes 5ms. After the terminal device switches to the P2P channel and works for 25ms, it will switch to the STA channel again to communicate with the wireless router. The switching of the terminal device between different channels results in a shorter time slice for data transmission between terminal devices. For example, in the screen projection scenario, it is necessary to wait until the P2P time slice between the two devices corresponds before data transmission can be performed, resulting in freezes and delays in the projection screen, affecting the user experience.

[0061] The following first introduces the transmission method by taking the scenario where the P2P channel of one terminal device is the same as the STA channel and the P2P channel of another terminal device is different from the STA channel (i.e., single-ended same frequency different channels) as an example.

[0062] For example, Figure 2A As shown, the mobile phone 101 and the wireless router 100 establish a communication connection based on the dynamic frequency selection (Dynamic Frequency Selection, DFS) channel 60, and the tablet 201 and the wireless router 200 establish a communication connection based on the 5G frequency band 40 channel. When the mobile phone 101 and the tablet 201 establish a P2P communication connection, the STA channel (5G frequency band 40 channel) corresponding to the tablet 201 is selected as the P2P channel.

[0063] Since the STA channel and P2P channel of the mobile phone 101 are different, the mobile phone 101 needs to switch between the two channels in time division, such as Figure 2B As shown, in the P2P time slice, the mobile phone 101 communicates with the tablet 201 through the P2P channel; in the STA time slice, the mobile phone 101 communicates with the wireless router 100 through the DFS channel 60. Since the mobile phone 101 needs to switch between different channels, and switching channels also takes a certain amount of time, the working time for P2P data transmission with the tablet 201 is too short, resulting in freezes, timeouts, etc., affecting the user experience.

[0064] The following introduces the transmission method by taking the scenario where the P2P channels and STA channels of two terminal devices are different (i.e., the two ends have the same frequency but different channels) as an example.

[0065] For example, Figure 3AAs shown, both the mobile phone 101 and the tablet 201 establish a communication connection with the wireless router 100 through the DFS channel 60, and at the same time, the mobile phone 101 and the tablet 201 transmit data through the P2P channel (5G band 40 channel). Since the STA channel and the P2P channel of the mobile phone 101 and the tablet 201 are both the same frequency but different channels, it is necessary to perform time-sharing switching between the two channels at the same time, such as Figure 3B As shown, in the P2P time slice, the mobile phone 101 and the tablet 201 communicate through the P2P channel; in the STA time slice, the mobile phone 101 and the wireless router 100 communicate through the DFS channel, and the tablet 201 and the wireless router 100 communicate through the DFS channel. Figure 3B It can be seen that when the mobile phone 101 and the tablet 201 communicate, the P2P working time is too short, which will cause freezes, timeouts and other phenomena.

[0066] In some embodiments, since the time used for P2P time slice configuration, channel switching and STA time slice configuration of the mobile phone 101 and the tablet 201 may be different, the P2P time slice may not completely correspond during P2P communication, for example, Figure 3C As shown, the mobile phone 101 adopts 20ms / 20ms time-sharing, and the tablet 201 adopts 25ms / 25ms time-sharing. Since the time-sharing time slices of the mobile phone 101 and the tablet 201 are different, the two terminal devices will switch to the P2P channel at the same time only in a very short period of time, resulting in a shorter time for the P2P channel to transmit data, and the phenomena of freeze, blurred picture, video frame loss, timeout, etc. are more serious, affecting the user experience.

[0067] To solve the above problems, an embodiment of the present application provides a communication method. When a local device (e.g., a first terminal device) is preparing to establish a P2P connection with a peer device (e.g., a second terminal device), when the local device has accessed a wireless network based on a first channel, a P2P channel between the two terminal devices can be established based on the first channel of the access network. For example, the local device can send a request message for establishing a P2P channel to the peer device, and the request message may include the first channel information of the access network, so as to establish a P2P channel between the two terminal devices based on the first channel of the access network. In this way, it can be ensured that the STA channel and the P2P channel of at least one end device are the same, thereby effectively reducing the occurrence of time-sharing switching scenarios between different channels of the terminal device, increasing the time for the P2P channel to transmit data, avoiding the phenomenon of screen freeze, etc., and improving the user experience.

[0068] In some embodiments, if the above-mentioned first channel is any channel in the DFS channel, that is, the local device has accessed the wireless network based on any channel in the DFS channel, since not all devices support the creation of P2P communication in the DFS channel, therefore, when determining that the local device accesses the wireless network based on any channel in the DFS channel, it is possible to judge whether the configurations of the local device and the opposite device both support the creation of P2P communication in the DFS channel. When it is determined that the configurations of the local device and the opposite device both support the creation of P2P communication in the DFS channel, a P2P channel between the two terminal devices can be established based on the above-mentioned DFS channel of the access network.

[0069] It can be understood that in some embodiments, the local device and the opposite device can configure a software program for implementing the creation of P2P communication in the DFS channel at the framework layer in the software architecture to support the terminal device to create P2P communication in the DFS channel. The local device can send a request to the opposite device through a near field communication method such as Bluetooth and near field communication technology (NFC) to obtain whether the opposite device supports the creation of P2P communication in the DFS channel.

[0070] In some embodiments, such as Figure 4A As shown, taking the local device as mobile phone 101 and the opposite device as tablet 201 as an example, if mobile phone 101 connects to a wireless access point (AP) based on any channel in the DFS channel to access the wireless network, and the chips of mobile phone 101 and tablet 201 both support DFS channels to establish P2P communication, the DFS channel of mobile phone 101 can be added to the P2P channel list, and the P2P channel can be established on the DFS channel of mobile phone 101, so that the STA channel and P2P channel of mobile phone 101 are the same. In this way, at least one end device can avoid time-sharing switching between the P2P channel and the DFS channel, reduce P2P channel data transmission anomalies, and improve user experience.

[0071] In some embodiments, Figure 4B As shown, taking the local device as mobile phone 101 and the opposite device as tablet 201, if mobile phone 101 is not connected to the wireless network, and if mobile phone 101 determines that tablet 201 connects to the AP through any channel in the DFS channel to access the wireless network, if the chips of mobile phone 101 and tablet 201 both support the creation of P2P communication in the DFS channel, the DFS channel of tablet 201 can be added to the P2P channel list, and the P2P channel can be established on the DFS channel of the opposite device. In this way, the local device is a single-channel communication, and the P2P channel of the opposite device and the DFS channel are the same frequency and channel, which can avoid time-sharing switching between different channels between the local device and the opposite device, effectively reduce the occurrence of time-sharing multiplexing scenarios, and improve channel transmission performance and user experience.

[0072] In some embodiments, if the local device has accessed the wireless network based on any channel in the DFS channel, but if the chip of the local or opposite electronic device does not support the creation of P2P communication in the DFS channel, at this time, if the opposite device accesses the wireless network based on the DFS channel, or the opposite device has not accessed the wireless network, other channels (for example, the 149 channel configured by default in the system, etc.) can be used as P2P channels to establish a P2P communication connection; if the opposite device accesses the wireless network by connecting to a non-DFS channel, the channel of the opposite device can be used as a P2P channel to establish a communication connection between the local device and the opposite device.

[0073] In some embodiments, if the local device establishes wireless communication with the AP through a non-DFS channel, when the two terminal devices use the P2P function to transmit data, the non-DFS channel for establishing wireless communication between the local device and the AP can be added to the P2P channel list, and the local device channel can be used as the P2P channel to establish a P2P communication connection.

[0074] In some embodiments, if the local device is not connected to the wireless network, and the local device determines that the opposite device connects to the wireless network through a non-DFS channel to connect to the wireless access point, the opposite device channel can be used as a P2P channel to establish a P2P communication connection between the local device and the opposite device.

[0075] In some embodiments, if the local device is not connected to the wireless network, and it is determined that the opposite device is connected to the wireless network through the DFS channel to connect to the wireless access point, but if the local or opposite electronic device chip does not support the creation of P2P communication in the DFS channel, any other channel (for example, the system default configuration channel 149, etc.) can be used as a P2P channel to establish a P2P communication connection between the local device and the opposite device.

[0076] In some embodiments, if neither the local device nor the opposite device is connected to a wireless network, any other channel (eg, channel 149 configured by default in the system, etc.) can be used as a P2P channel to establish a P2P communication connection between the local device and the opposite device.

[0077] In this way, the method in this application can reduce P2P communication data transmission anomalies, improve P2P communication performance, and enhance user experience.

[0078] In some embodiments, before establishing a P2P channel, the two-end devices generally need to perform device discovery first, for example, Figure 1In the application scenario of screen projection shown, the screen projection of the mobile phone 101 is turned on, the mobile phone 101 will send a request frame, the computer 102 receives the request frame sent by the mobile phone, and returns a response frame to the mobile phone, so that the mobile phone 101 and the computer 102 can discover each other. In some embodiments, the request frame and the response frame can carry indication information for indicating that a P2P connection is to be established to complete the screen projection to trigger the establishment of a P2P connection, etc.

[0079] In some embodiments, during the device discovery process, the device as the slave device group client (Group Client, GC) and the device as the master device group owner (Group Owner, GO) can also be determined by pre-setting or two-way negotiation. For example, the pre-setting method may include: pre-setting a large-screen device as the GO, or pre-setting a terminal device that can support more functions as the GO, and the embodiments of the present application do not make specific limitations on this. For example, in the application scenario of multi-screen collaboration, a computer (personal computer, PC) or a tablet computer is generally used as the GO; in the application scenario of mirror projection, a large-screen device is generally used as the GO; in the application scenario of file sharing, the sending end is generally used as the GO, and the embodiments of the present application do not make specific limitations on this.

[0080] In some embodiments, the local device mentioned above in the present application may be a GO device, and the opposite device may be a GC device, which is used to perform the above P2P channel confirmation step. In the P2P mode, the role of the GO is similar to that of a wireless access point AP, and the GC implements the function of a terminal device. The connection between the GC and the GO is similar to the connection between a terminal device and a wireless router.

[0081] Before describing in detail the communication method provided in the embodiments of the present application, the terminal device mentioned in the embodiments of the present application is first introduced. It can be understood that the terminal device in the embodiments of the present application can be any electronic device such as a mobile phone, a computer, a virtual reality (VR) device, a tablet computer, a wearable device, an augmented reality (AR) device, a laptop computer, etc. The form of the terminal device in the embodiments of the present application is not specifically limited.

[0082] like Figure 5 As shown, a hardware structure diagram of an electronic device 500 according to an embodiment of the present application is exemplified. Figure 5 As shown, the electronic device 500 may include a processor 110 (or host), a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, a button 101, a display screen 102, and a touch screen 103, etc.

[0083] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute the only possible implementation method for the electronic device 500. In other embodiments of the present application, the electronic device 500 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0084] The processor 110 may include one or more processing units, for example, a processing module or processing circuit including a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor, a microprocessor (MCU), an artificial intelligence (AI) processor, or a programmable logic device (FPGA). Among them, different processing units may be independent devices or integrated into one or more processors. A storage unit may also be provided in the processor 110 for storing instructions and data. In some embodiments, the storage unit in the processor 110 is a cache memory 180, which may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it may be directly called from the storage unit, thereby avoiding repeated access, reducing the waiting time of the processor 110, and thus improving the efficiency of the system.

[0085] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0086] It can be understood that in the embodiment of the present application, the processor can be used to execute the method steps performed by the first terminal device or the second terminal device in the communication method of the present application.

[0087] The power module 140 may include a power source, a power management component, etc. The power source may be a battery. The power management component is used to manage the charging of the power source and the power supply of the power source to other modules. In some embodiments, the power management component includes a charging management module and a power management module. The charging management module is used to receive charging input from the charger; the power management module is used to connect the power source, and the charging management module is connected to the processor 110. The power management module receives input from the power source and / or the charging management module, and supplies power to the processor 110, the display screen 102, the camera 170, and the wireless communication module 120.

[0088] The mobile communication module 130 may include, but is not limited to, an antenna, a power amplifier, a filter, a low noise amplifier (LAN), etc. The mobile communication module 130 may provide a solution for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 500. The mobile communication module 130 may receive electromagnetic waves by an antenna, and perform filtering, amplification, and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 130 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the same device as at least some of the modules of the processor 110.

[0089] The wireless communication module 120 may include an antenna, and transmit and receive electromagnetic waves via the antenna. The wireless communication module 120 may provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., which are applied to the electronic device 500. The electronic device 500 may communicate with the network and other devices through wireless communication technology.

[0090] In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the electronic device 500 may also be located in the same module.

[0091] The display screen 102 is used to display a human-computer interaction interface, images, videos, etc. The display screen 102 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a quantum dot light emitting diode (QLED), etc.

[0092] The sensor module 190 may include a proximity light sensor, a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, an electromagnetic wave absorption rate sensor, a sound sensor, and the like.

[0093] The audio module 150 is used to convert a digital audio signal into an analog audio signal output, or to convert an analog audio input into a digital audio signal. The audio module 150 can also be used to encode and decode an audio signal. In some embodiments, the audio module 150 can be arranged in the processor 110, or some functional modules of the audio module 150 can be arranged in the processor 110. In some embodiments, the audio module 150 can include a speaker, an earpiece, a microphone, and an earphone interface.

[0094] The camera 170 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the image signal processing (Image Signal Processing, ISP) to convert it into a digital image signal. The electronic device 500 can realize the shooting function through the ISP, the camera 170, the video codec, the graphics processing unit (Graphic Processing Unit, GPU), the display screen 102 and the application processor.

[0095] The interface module 160 includes an external memory interface, a universal serial bus (USB) interface, etc. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 500. The external memory card communicates with the processor 110 through the external memory interface to implement a data storage function. The universal serial bus interface is used for the electronic device 500 to communicate with other electronic devices.

[0096] In some embodiments, the electronic device 500 further includes a button 101, a motor, and an indicator. The button 101 may include a volume button, an on / off button, etc. The motor is used to make the electronic device 500 produce a vibration effect, and different application scenarios (e.g., time reminder, receiving information, alarm clock, game, etc.) may correspond to different vibration feedback effects. The indicator may include a laser indicator, a radio frequency indicator, a light emitting diode (LED) indicator, etc.

[0097] The following is a detailed description of the communication method in the embodiment of the present application based on the terminal device mentioned in the embodiment of the present application.

[0098] Firstly based on Figure 6 The flow chart shown in the figure details the communication method in the present application. Specifically, the method comprises the following steps:

[0099] S601: A GO is created based on the first terminal device, and a GC is created based on the second terminal device.

[0100] It can be understood that in the embodiments of the present application, when the terminal devices share computing resources and services, data information can be directly transmitted through P2P technology, such as screen projection, multi-device collaboration, face-to-face quick transmission, etc. When connecting to P2P communication, the terminal device will scan and search for the peer device, and the two parties will negotiate to determine the GO end and the GC end. In the P2P mode, the role of GO is similar to that of a wireless access point AP, and GC implements the functions of the terminal device. The connection between GC and GO is similar to the connection between a terminal device and a wireless router.

[0101] In some embodiments, the terminal device can scan and search for the peer device through Bluetooth, near field communication (NFC), etc., and initiate a P2P communication request to the peer device. For example, after the terminal device turns on the Bluetooth function, it can discover the peer device through Bluetooth and initiate a P2P communication request to the peer device. For another example, when the NFC function of the terminal device is turned on, the user touches the NFC area with the handheld terminal device, and the terminal device will initiate a P2P communication request to the other party. The embodiments of the present application do not specifically limit this.

[0102] In some embodiments, the two devices can negotiate and determine the GO end and the GC end based on preset rules. For example, the preset rules may include: presetting a large-screen device as the GO, or presetting a terminal device that can support more functions as the GO. The embodiments of this application do not specifically limit this. For example, in the application scenario of multi-screen collaboration, a personal computer (PC) or tablet computer is generally used as the GO; in the application scenario of mirror projection, a large-screen device is generally used as the GO; in the application scenario of file sharing, the sending end is generally used as the GO. The embodiments of this application do not specifically limit this.

[0103] This application takes the first terminal device as a GO device and the second terminal device as a GC device as an example to illustrate the following process.

[0104] S602: Determine whether the first terminal device is connected to the wireless access point. If yes, proceed to S603; if no, proceed to S607.

[0105] It can be understood that in the embodiment of the present application, when the first terminal device and the second terminal device establish a P2P connection channel, it is first necessary to determine whether the first terminal device has accessed the wireless network, for example, by connecting to a wireless router to access the wireless network. If the first terminal device has accessed the wireless network, then go to S603 to determine whether the first communication channel connecting the first terminal device to the wireless access point is a DFS channel; if the first terminal device is not connected to the wireless access point, then go to S607 to determine whether the second terminal device has accessed the wireless network by connecting to a wireless router.

[0106] In some embodiments, if the first terminal device has established a communication connection with the wireless router through a channel, if the first terminal device and the second terminal device establish P2P communication based on another channel, the first terminal device needs to switch between different channels. Figure 2B The time-sharing switching scenario shown in the figure takes a long time to switch, resulting in a decrease in data transmission capacity during P2P communication, causing freezes, timeouts, and other phenomena, affecting the user experience.

[0107] S603: Determine whether the first communication channel between the first terminal device and the wireless access point is DFS. If yes, proceed to S605; if no, proceed to S604.

[0108] It can be understood that in the embodiment of the present application, after determining that the first terminal device accesses the wireless network, the first terminal device system needs to determine whether the first terminal device is connected to the DFS channel. If the first terminal device accesses the wireless network by connecting to any channel in the DFS channel, then go to S605 to determine whether the electronic device chip supports the DFS channel to create P2P communication; if the first terminal device is not connected to the DFS channel, that is, the first terminal device accesses the wireless network through any other non-DFS channel, then go to S604 to establish the P2P channel on the first terminal device channel.

[0109] S604: A P2P channel is established on the first terminal channel.

[0110] It can be understood that in the embodiment of the present application, after the first terminal device system determines that the first terminal device accesses the wireless network through a non-DFS channel, the first terminal device channel is added to the P2P channel list that is optional for the first terminal device and the second terminal device, and the P2P channel is established on the STA communication channel of the first terminal device.

[0111] In this way, the P2P channel and STA channel of the first terminal device are of the same frequency and channel, which avoids the time-sharing switching of the first terminal device between different channels, and effectively improves the P2P communication performance and user experience.

[0112] S605: Determine whether the chips of the first terminal device and the second terminal device support the DFS channel to create P2P communication. If yes, proceed to S606; if no, proceed to S607.

[0113] It can be understood that in the embodiment of the present application, after determining that the first terminal device has established a connection with the wireless router through any channel in the DFS channel, it is necessary to judge whether the electronic device chips of the first terminal device and the second terminal device support the creation of P2P communication on the DFS channel. If supported, go to S606 to establish the P2P channel on the DFS channel of the first terminal device; if not supported, go to S607 to determine whether the second terminal device is connected to the wireless network. In some embodiments, the chips of some terminal devices support the creation of P2P communication on the DFS channel, such as the software architecture corresponding to the chip of a mobile phone or a tablet, for example, the framework layer (Framework, FWK) of the terminal device can be configured with corresponding programs or functions to support the creation of P2P communication on the DFS channel. The embodiment of the present application does not limit this.

[0114] S606: The P2P channel is established on the DFS channel of the first terminal.

[0115] It can be understood that in an embodiment of the present application, when it is determined that the first terminal device establishes a connection with the wireless router through any channel in the DFS channel, and the electronic device chips of the first terminal device and the second terminal device support the creation of P2P communication on the DFS channel, the DFS channel of the first terminal device can be added to the P2P channel list, and the P2P channel can be established on the DFS channel of the first terminal device.

[0116] In this way, the P2P channel and STA channel of at least one of the first terminal device and the second terminal device are of the same frequency and channel, which effectively reduces the scenario of time-sharing switching of terminal devices between different channels and improves P2P communication performance and user experience.

[0117] S607: Determine whether the second terminal device is connected to the wireless access point. If yes, proceed to S608; if no, proceed to S612.

[0118] It can be understood that in the embodiment of the present application, when it is determined that the first terminal device is not connected to the wireless network; or when it is determined that the first terminal device establishes a connection with the wireless router through any channel in the DFS channel, but the electronic device chip of the first terminal device or the second terminal device does not support the creation of P2P communication on the DFS channel, it is necessary to judge whether the second terminal device has been connected to the wireless network, for example, by connecting to the wireless router to access the wireless network. If the second terminal device has been connected to the wireless network, go to S608 to determine whether the second terminal device is connected to the DFS channel; if the second terminal device is not connected to the wireless network, go to S612, and the P2P channel is established on channel 149.

[0119] S608: Determine whether the second communication channel through which the second terminal device is connected to the wireless access point is a DFS channel. If yes, proceed to S609; if no, proceed to S611.

[0120] It can be understood that in the embodiment of the present application, after determining that the second terminal device accesses the wireless network, the first terminal device needs to determine whether the second terminal device is connected to the DFS channel. If the second terminal device accesses the wireless network by connecting to any channel in the DFS channel, then go to S609 to determine whether the electronic device chip supports the DFS channel to create P2P communication; if the second terminal device is not connected to the DFS channel, that is, the second terminal device accesses the wireless network through any other non-DFS channel, then go to S611 to establish the P2P channel on the second terminal device channel.

[0121] S609: Determine whether the chips of the first terminal device and the second terminal device support the DFS channel to create P2P communication. If yes, proceed to S610; if no, proceed to S612.

[0122] It can be understood that in the embodiment of the present application, after determining that the second terminal device has established a connection with the wireless router through any channel in the DFS channel, it is necessary to judge whether the electronic device chips of the first terminal device and the second terminal device support the creation of P2P communication on the DFS channel. If supported, go to S610 to establish the P2P channel on the DFS channel of the second terminal device; if not supported, go to S612 to establish the P2P channel on any other non-DFS channel (for example, the 149 channel configured by default in the system, etc.). In some embodiments, the chips of some terminal devices support the creation of P2P communication on the DFS channel, and the embodiment of the present application does not limit this.

[0123] S610: A P2P channel is established on the DFS channel of the second terminal.

[0124] It can be understood that in an embodiment of the present application, when it is determined that the first terminal device is not connected to the wireless network, the second terminal device establishes a connection with the wireless router through any channel in the DFS channel, and the electronic device chips of the first terminal device and the second terminal device support the creation of P2P communication on the DFS channel. The DFS channel of the second terminal device can be added to the P2P channel list, and the P2P channel can be established on the DFS channel of the second terminal device.

[0125] S611: A P2P channel is established on the second terminal channel.

[0126] It can be understood that in an embodiment of the present application, when the first terminal device system determines that the first terminal device is not connected to the wireless network, and at the same time determines that the second terminal device is connected to the wireless network through a non-DFS channel, the second terminal device channel can be added to the P2P channel list optional for GO and GC, and the P2P channel can be established on the STA communication channel of the second terminal device.

[0127] In some embodiments, when the first terminal device system determines that the first terminal device establishes a connection with the wireless router through any channel in the DFS channel, but the electronic device chip of the first terminal device or the second terminal device does not support the creation of P2P communication on the DFS channel, and the first terminal device determines that the second terminal device accesses the wireless network through a non-DFS channel, the second terminal device channel can be added to the P2P channel list optional for GO and GC, and the P2P channel can be established on the STA communication channel of the second terminal device.

[0128] S612: The P2P channel is established on channel 149.

[0129] It can be understood that in the embodiment of the present application, when it is determined that neither the first terminal device nor the second terminal device is connected to the wireless access point, the P2P channel can be established on any other channel (for example, channel 149 configured by system default), and the embodiment of the present application does not limit this.

[0130] In some embodiments, if it is determined that the first terminal device and the second terminal device both establish a connection with the wireless router through any channel in the DFS channel, but the electronic device chip of the first terminal device or the second terminal device does not support the creation of P2P communication on the DFS channel, the P2P channel can be established on any other channel (for example, channel 149 configured by default in the system), and the embodiments of the present application are not limited to this.

[0131] In some embodiments, the first terminal device system determines that the first terminal device establishes a connection with the wireless router through any channel in the DFS channel, but the electronic device chip of the first terminal device or the second terminal device does not support the creation of P2P communication on the DFS channel, and at the same time determines that the second terminal device is not connected to the wireless access point, the P2P channel can be established on any other channel (for example, channel 149 configured by default in the system), which is not limited in this embodiment of the present application.

[0132] In some embodiments, if the first terminal device system determines that the first terminal device is not connected to the wireless access point, and at the same time determines that the second terminal device establishes a connection with the wireless router through any channel in the DFS channel, but the electronic device chip of the first terminal device or the second terminal device does not support the creation of P2P communication on the DFS channel, the P2P channel can be established on any other channel (for example, channel 149 configured by default in the system), and the embodiments of the present application are not limited to this.

[0133] For ease of description, take the local device as a GO device, the opposite device as a GC device, and the wireless access point as a wireless router as an example. Figure 7 The specific process diagram of establishing a P2P channel in an embodiment of the present application is shown. Specifically, the method includes the following steps:

[0134] S701: Create a GO.

[0135] It can be understood that in the embodiment of the present application, after the local device scans and finds the opposite device, the two terminal devices can negotiate and determine the GO end and the GC end based on the preset rules, and the embodiment of the present application does not specifically limit this. The specific creation method can refer to the description in the above step S601.

[0136] S702: The local device connects to DFS upstream.

[0137] It can be understood that in the embodiment of the present application, the GO terminal device can establish a communication connection with the wireless router based on the DFS channel.

[0138] S703: The local device is not connected uplink.

[0139] It can be understood that in the embodiment of the present application, the GO terminal device can detect that the local device is not connected to the wireless network.

[0140] S704: The uplink connection of the local device is not DFS.

[0141] It can be understood that in the embodiment of the present application, the GO end device can detect that the local end device establishes a communication connection with the wireless router based on any other non-DFS channel.

[0142] S705: Determine whether the chip supports DFS channel creation GO. If yes, proceed to S711; if no, proceed to S706.

[0143] It can be understood that in the embodiment of the present application, after determining that the GO end device has established a connection with the wireless router through any channel in the DFS channel, it is necessary to judge whether the electronic device chip supports the creation of P2P communication on the DFS channel. If it does, go to S711 to establish the P2P channel on the local device, i.e., the GO end device channel; if it does not, go to S706 to determine whether the opposite device is connected to the DFS.

[0144] S706: Determine whether the opposite device is connected to DFS. If yes, proceed to S707; if no, proceed to S710.

[0145] It can be understood that in the embodiment of the present application, when it is determined that the GO end device establishes a connection with the wireless router through any channel in the DFS channel, but the electronic device chip does not support the creation of P2P communication on the DFS channel, it is necessary to judge whether the opposite device, that is, the GC end device, is connected to the DFS channel. If the opposite device is connected to the DFS channel, go to S707 to establish P2P communication on channel 149; if the opposite device is not connected to the DFS channel, go to S710 to create P2P on the opposite device channel.

[0146] S707: P2P communication is established on channel 149.

[0147] It can be understood that in the embodiment of the present application, when it is determined that both the GO end and the GC end devices are not connected to the wireless access point, the P2P channel can be established on any other channel (for example, the 149 channel configured by system default), and the embodiment of the present application does not limit this.

[0148] In some embodiments, when it is determined that both the GO-end and GC-end devices establish a connection with the wireless router through any channel in the DFS channel, but the GO-end or GC-end electronic device chip does not support the creation of P2P communication on the DFS channel, the P2P channel can be established on any other channel (for example, channel 149 configured by system default), and the embodiments of the present application are not limited to this.

[0149] In some embodiments, if the GO-end device system determines that the GO-end device is not connected to the wireless access point, and at the same time determines that the GC-end device establishes a connection with the wireless router through any channel in the DFS channel, but the GO-end or GC-end electronic device chip does not support the creation of P2P communication on the DFS channel, the P2P channel can be established on any other channel (for example, channel 149 configured by default in the system), and the embodiments of the present application are not limited to this.

[0150] S708: The peer device is not connected to WiFi.

[0151] It can be understood that in the embodiment of the present application, the GO device can detect that the opposite device is not connected to the wireless network.

[0152] S709: Determine whether the opposite device is connected to DFS. If yes, proceed to S710; if no, proceed to S707.

[0153] It can be understood that in the embodiment of the present application, when it is determined that the first terminal device is not connected to the wireless network, it is necessary to judge whether the opposite device, that is, the GC device, is connected to the DFS channel. If the opposite device is connected to the DFS channel, go to S710 and create P2P on the opposite device channel; if the opposite device is not connected to the DFS channel, go to S707 and establish P2P communication on the 149 channel.

[0154] S710: P2P is created on the peer device channel.

[0155] It can be understood that in the embodiment of the present application, when it is determined that the GO end device is not connected to the wireless network and the GC end device establishes a connection with the wireless router through any channel in the DFS channel, the P2P channel is established on the channel of the opposite end device, namely the GC end device.

[0156] In some embodiments, when the GO-end device system determines that the GO-end device establishes a connection with the wireless router through any channel in the DFS channel, but the electronic device chip does not support the creation of P2P communication on the DFS channel, and the counterpart device, i.e., the GC-end device, accesses the wireless network through a non-DFS channel, the P2P channel can be established on the GC-end channel.

[0157] S711: P2P is created on the local device channel.

[0158] It can be understood that in the embodiment of the present application, when it is determined that the GO-end device establishes a connection with the wireless router through any channel in the DFS channel, and the electronic device chip supports the creation of P2P communication on the DFS channel, the DFS channel of the GO end can be added to the P2P channel list, and the P2P channel can be established on the DFS channel of the GO end.

[0159] It can be understood that in the embodiment of the present application, after the GO-end device system determines that the GO-end device accesses the wireless network through a non-DFS channel, a P2P channel is established on the GO-end channel.

[0160] In this way, the above process effectively reduces the occurrence of time-sharing switching scenarios of terminal devices between different channels, improving channel transmission performance and user experience.

[0161] The present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, and is used to execute the communication method mentioned in the present application.

[0162] The present application provides a readable storage medium, wherein the readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the communication method mentioned in the present application.

[0163] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0164] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.

[0165] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0166] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, a floppy disk, an optical disk, an optical disk, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), a magnetic card or an optical card, a flash memory, an electrically erasable programmable read-only memory (EEPROM), or a tangible machine-readable memory for transmitting information (e.g., carrier wave, infrared signal digital signal, etc.) using the Internet in an electrical, optical, acoustic, or other form of propagation signal. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0167] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0168] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0169] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the above elements.

[0170] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. A communication method, characterized in that: The method comprises: The first terminal device is connected to the first wireless access device based on the first channel; The first terminal device receives a first instruction to establish a point-to-point communication connection with a second terminal device; Determining that both the first terminal device and the second terminal device support point-to-point communication based on the first channel; Point-to-point communication between the first terminal device and the second terminal device is established based on the first channel.

2. The method according to claim 1, characterized in that The first channel is a dynamic frequency selection channel.

3. The method according to claim 2, characterized in that The method further comprises: If it is determined that the first terminal device or the second terminal device does not support point-to-point communication based on the first channel, and it is determined that the second terminal device is connected to the second wireless access device based on a second channel, and the second channel includes any channel in a non-dynamic frequency selection channel; Point-to-point communication between the first terminal device and the second terminal device is established based on the second channel.

4. The method according to claim 2, characterized in that: The method further comprises: If it is determined that the first terminal device or the second terminal device does not support point-to-point communication based on the first channel, and it is determined that the second terminal device is connected to the second wireless access device based on a third channel, and the third channel is a dynamic frequency selection channel; Point-to-point communication between the first terminal device and the second terminal device is established based on a fourth channel, and the fourth channel includes any channel in a non-dynamic frequency selection channel.

5. The method according to claim 2, characterized in that: The method further comprises: If it is determined that the first terminal device or the second terminal device does not support point-to-point communication based on the first channel, and it is determined that the second terminal device is not connected to the second wireless access device; Point-to-point communication between the first terminal device and the second terminal device is established based on a fourth channel, and the fourth channel includes any channel in a non-dynamic frequency selection channel.

6. The method according to claim 1, characterized in that The method further comprises: The first terminal device is not connected to the first wireless access device; If it is determined that the second terminal device is connected to the second wireless access device based on a second channel, the second channel includes any channel in a non-DFS channel; Point-to-point communication between the first terminal device and the second terminal device is established based on the second channel.

7. The method according to claim 1, characterized in that The method further comprises: The first terminal device is not connected to the first wireless access device; If it is determined that the second terminal device is connected to the second wireless access device based on the third channel, and it is determined that both the first terminal device and the second terminal device support point-to-point communication based on the third channel, and the third channel is a dynamic frequency selection channel; Point-to-point communication between the first terminal device and the second terminal device is established based on the third channel.

8. The method according to claim 1, characterized in that The method further comprises: The first terminal device is not connected to the first wireless access device; If it is determined that the second terminal device is connected to the second wireless access device based on the third channel, and it is determined that the first terminal device or the second terminal device does not support point-to-point communication based on the third channel, the third channel is a dynamic frequency selection channel; Point-to-point communication between the first terminal device and the second terminal device is established based on a fourth channel, and the fourth channel includes any channel in a non-dynamic frequency selection channel.

9. The method according to claim 1, characterized in that: The method further comprises: The first terminal device is not connected to the first wireless access device; If it is determined that the second terminal device is not connected to the second wireless access device; Point-to-point communication between the first terminal device and the second terminal device is established based on a fourth channel, and the fourth channel includes any channel in a non-dynamic frequency selection channel.

10. The method according to claim 1, characterized in that The method further comprises: If the first terminal device is connected to the first wireless access device based on the fifth channel; Point-to-point communication between the first terminal device and the second terminal device is established based on the fifth channel, and the fifth channel includes any channel in the non-dynamic frequency selection channel.

11. The method according to any one of claims 1 to 10, characterized in that: The first terminal device is a group owner device, and the second terminal device is a group client device.

12. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, and is used to execute the communication method described in any one of claims 1-11.

13. A readable storage medium, characterized in that: The readable storage medium stores instructions, which, when executed on the electronic device, enable the electronic device to execute the communication method according to any one of claims 1 to 11.

Citation Information

Cited By

  • Communication method, electronic device, and storage medium

    EP4734568A1

  • Communication method, electronic device, and storage medium

    WO2025015933A1