Communication method, electronic equipment and readable storage medium
By detecting the changes in the communication channel between the terminal equipment and the network equipment, avoiding the radar signal is achieved, and the problem that the terminal equipment cannot use the 5GHz frequency band DFS channel for P2P communication is solved, which improves data transmission efficiency and avoids interference to the radar system. .
Patent Information
- Application Number
- CN202311025451.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2025-02-21
AI Technical Summary
When terminal devices perform interconnected services through point-to-point connection (P2P) technology, they cannot comply with the dynamic frequency selection (DFS) channel in the 5GHz band for data communication because these devices lack radar detection capabilities.
By detecting the communication channel changes between the terminal equipment and the network equipment, avoiding the radar signal is achieved, so that point-to-point communication is used without interfering with the global radar system.
Point-to-point communication between terminal devices based on DFS channel is realized, data transmission efficiency is improved, and interference to the radar system is avoided.
Smart Images

Figure CN119497253A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technologies, and in particular to a communication method, electronic equipment and a readable storage medium. Background Art
[0002] With the development of science and technology, there are more and more interconnected applications between terminal devices, such as unlimited collaboration, wireless screen projection, wireless transmission, etc. based on the interconnection between terminal devices. Wireless connections can be established between terminal devices through peer-to-peer (P2P) technology.
[0003] According to relevant standards, frequencies near 5 GHz and 5 GHz channels with a bandwidth of 160 MHz can be used for communication. Figure 1 As shown in Figure 1, the effective bandwidth of the 802.11a standard channel is 18.8 MHz, and there are no overlapping channels. The 5.150-5.350 GHz frequency band includes 8 non-interfering sub-channels, such as Figure 1 36, 40, 44, 48, 52, 56, 60, 64. 5.725-5.850GHz includes 5 sub-channels that do not interfere with each other. Figure 1 149, 153, 157, 161, and 165 in the 5.490-5.730 GHz frequency band includes 12 sub-channels, such as Figure 1 As shown are 100, 104, 108, 112, 120, 124, 128, 132, 136, 140, and 144. The frequency bands corresponding to the four channels 120, 124, 128, and 132 overlap with the weather radar.
[0004] It can be understood that in order to improve communication efficiency, adjacent channels can be merged to obtain a channel with a larger bandwidth. Figure 1 For example, by merging two adjacent 20MHz bandwidth channels among channels 36, 40, 44, 48, 52, 56, 60, and 64, four 40MHz bandwidth channels can be obtained; further, four adjacent 40MHz bandwidth channels can be merged to obtain two 80MHz bandwidth channels; and eight 20MHz bandwidth channels can be merged to obtain one 160MHz bandwidth channel. In some special cases, two non-contiguous 80MHz bandwidth channels can also be selected to combine into a 160MHz bandwidth channel. For example, Figure 1 Part of the 5490MHz-5730MHz frequency band has been occupied by meteorological radar. In order to avoid mutual interference, only two discontinuous 80MHz bandwidths can be combined into a 160MHz bandwidth.
[0005] It is known that the operating frequency bands of the global radar system are 5.25-5.35 GHz and 5.47-5.725 GHz. Therefore, there are channels in the 5 GHz frequency band that overlap with the operating frequency bands of the global radar system. Figure 1 As shown, the frequency bands corresponding to channels 48 to 144 overlap with the operating frequency bands of the global radar system. Among them, the channels corresponding to the frequency bands in the 5G band that overlap with the operating frequency bands of the global radar system are collectively referred to as dynamic frequency selection (DFS) channels. Therefore, in order to prevent devices operating on DFS channels in the 5GHz band from interfering with the radar system, devices operating on DFS channels must check for radar signals during startup and operation. If a radar signal is detected, the channel must be switched to avoid interference with the radar wave.
[0006] However, the current interconnection services based on P2P technology generally do not have radar detection capabilities. Therefore, when terminal devices perform interconnection services through P2P connections, they cannot legally use the DFS channels in the 5GHz frequency band for data communication. Summary of the invention
[0007] The embodiments of the present application provide a communication method, an electronic device and a readable storage medium, which can realize point-to-point communication between two terminal devices based on a dynamic frequency selection channel, thereby improving the data transmission efficiency based on point-to-point communication.
[0008] In a first aspect, an embodiment of the present application provides a communication method, the method comprising: point-to-point communication between a first terminal device and a second terminal device, and the first terminal device accessing a wireless network through a first network device; in response to detecting that the first terminal device communicates with the first network device through a first channel, the first terminal device uses the first channel to perform point-to-point communication with the second terminal device, wherein the first channel is a first dynamic frequency selection channel; in response to detecting that the first terminal device switches from the first channel to the second channel to communicate with the first network device, the first terminal device uses a third channel to perform point-to-point communication with the second terminal device.
[0009] It is understandable that the interconnection service between the first terminal device and the second terminal device based on point-to-point technology does not have radar detection capability. Therefore, when the first terminal device and the second terminal device communicate using point-to-point technology, the dynamic frequency selection channel cannot be used for data transmission. However, when the first terminal device accesses the wireless network through the first network device, since both the terminal device and the network device have radar detection capability, the first terminal device can use the dynamic frequency selection channel to transmit data with the first network device.
[0010] Therefore, when it is determined that the first terminal device uses a dynamic frequency selection channel to transmit data with the first network device, it indicates that there is no radar signal on the dynamic frequency selection channel, or there is no overlapping frequency band between the radar signal and the dynamic frequency selection channel, that is, there is no radar avoidance signal. Therefore, the first terminal device and the second terminal device can establish a point-to-point connection based on the dynamic frequency selection channel. Further, when it is detected that the first terminal device and the first network device switch from the first channel to the second channel to communicate with the first network device, it indicates that the first terminal device contains a radar signal, and the point-to-point communication channel between the first terminal device and the second terminal device needs to be switched from the first channel to the third channel.
[0011] It can be understood that based on the above communication method, not only can the first terminal device and the second terminal device establish point-to-point communication through the dynamic frequency selection channel, but also the point-to-point communication channel between the first terminal device and the second terminal device can be switched in time according to the changes of the dynamic frequency selection channel used for communication between the first terminal device and the first network device to avoid radar signals.
[0012] In a possible implementation of the first aspect, the method further includes: the third channel and the second channel are both second dynamic frequency selection channels.
[0013] It can be understood that in the process of the first terminal device using the dynamic frequency selection channel to communicate with the second terminal device in point-to-point mode, it is also necessary to detect in real time whether the channel used by the first terminal device to communicate with the second network device has changed. When it is detected that the channel used by the first terminal device and the first network device is switched to the second channel, it indicates that the first channel contains a radar signal and the second channel does not contain a radar signal. Therefore, the first terminal device uses the second terminal device for point-to-point communication. In other embodiments, other channels that do not contain radar signals, such as the third channel, may also be used. Wherein neither the third channel nor the second channel includes a radar signal.
[0014] In a possible implementation of the first aspect, the method further includes: the types of the third channel and the second channel do not belong to dynamic frequency selection channels, and the third channel is the same as or different from the second channel.
[0015] It can be understood that when it is detected that the first terminal device and the first network device interrupt the use of any channel in the dynamic frequency selection channel for data transmission, the point-to-point channel used for communication between the first terminal device and the second terminal device is switched to other channels, such as the second channel or the third channel.
[0016] In a possible implementation of the first aspect above, the method further includes: the first terminal device detects a first operation of establishing point-to-point communication with the second terminal device; the first terminal device detects whether the type of the communication channel with the first network device belongs to a dynamic frequency selection channel.
[0017] It can be understood that before establishing point-to-point communication with the second terminal device through the first terminal device, it is necessary to detect whether a dynamic frequency selection channel is used when data is transmitted between the first terminal device and the first network device. For example, the first terminal device transmits data with the first network device through a dynamic frequency selection channel. Assuming that the dynamic frequency selection channel used is the first dynamic frequency selection channel, it indicates that there is no radar signal at present, or there is no overlapping frequency band between the radar signal and the first dynamic frequency selection channel, that is, there is no radar avoidance signal. Therefore, the first terminal device can use the first dynamic frequency selection channel to establish a point-to-point connection with the second terminal device.
[0018] In a possible implementation of the first aspect above, the method further includes: in response to the first terminal device detecting that the type of the communication channel with the first network device is a non-dynamic frequency selection channel, the first terminal device uses the non-dynamic frequency selection channel to perform point-to-point communication with the second terminal device.
[0019] It can be understood that since the interconnection service between the first terminal device and the second terminal device based on the point-to-point technology does not have radar detection capability, when the type of the communication channel between the first terminal device and the first network device is a non-dynamic frequency selection channel, the first terminal device and the second terminal device can only establish point-to-point communication based on the non-dynamic frequency selection channel.
[0020] In a possible implementation of the first aspect above, the method also includes: the first terminal device detects a first operation of establishing point-to-point communication with the second terminal device, and also includes: in response to the first operation, the first terminal device establishes a Bluetooth connection with the second terminal device; the first terminal device sends negotiation information to the second terminal device based on the Bluetooth connection, wherein the negotiation information is used to determine a channel for point-to-point communication between the first terminal device and the second terminal device, and to determine: the first terminal device serves as a group owner device and the second terminal device serves as a group client device.
[0021] It can be understood that the above-mentioned first operation can be a sharing operation performed by the user on the first terminal device. For example, when the user needs to share the data information of the first terminal device with the second terminal device, a specific operation can be performed to initiate a request for the first terminal device to establish a P2P connection with the second terminal device, such as the user clicking on a function icon or application on the first terminal device for initiating a P2P connection request. The first terminal device can establish a point-to-point communication with other terminal devices, such as the second terminal device in the embodiment of the present application, by broadcasting a scanning signal.
[0022] In a possible implementation of the first aspect above, the method further includes: the first terminal device creates a first virtual access point on a first channel for point-to-point communication between the first terminal device and the second terminal device; the first terminal device sends basic information of the first virtual access point to the second terminal device; wherein the basic information at least includes a service set identifier and a password; the second terminal device connects to the first virtual access point based on the basic information; and the first terminal device and the second terminal device establish point-to-point communication based on the first virtual access point and the dynamic frequency selection channel.
[0023] It can be understood that in some embodiments, the above basic information also includes the MAC address (media access control address, MAC) of the first terminal device and the MAC address of the second terminal device. When the first terminal device informs the second terminal device of the dynamic frequency selection channel, the first terminal device and the second terminal device agree to handshake on the dynamic frequency selection channel. At this time, the service set identifier and password are the information required for the first terminal device and the second terminal device to shake hands on the dynamic frequency selection channel. The MAC address of the first terminal device and the MAC address of the second terminal device are both parameters required for point-to-point connection. Furthermore, after the first terminal device and the second terminal device successfully shake hands, a point-to-point connection is established.
[0024] In a possible implementation of the first aspect above, the method further includes: in response to detecting that the channel used by the first terminal device to communicate with the first network device is switched from the second channel to the first channel, the first terminal device switches the first virtual access point to the first channel.
[0025] It can be understood that when it is detected that the channel used by the first terminal device to communicate with the first network device is switched from the second channel to the first channel, that is, from the non-dynamic frequency selection channel to the dynamic frequency selection channel, the first terminal device can switch the first virtual access point to the first channel, that is, the first terminal device can switch the first virtual access point from the non-dynamic frequency selection channel to the dynamic frequency selection channel.
[0026] 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.
[0027] 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
[0028] Figure 1 According to an embodiment of the present application, a distribution diagram of 5 GHz frequency band channels is shown.
[0029] Figure 2 According to an embodiment of the present application, a schematic diagram of a scenario for executing an interconnected service based on P2P technology is shown.
[0030] FIG3( a ) is a schematic diagram showing a first scenario of establishing P2P communication based on a DFS channel according to an embodiment of the present application.
[0031] FIG3( b ) is a schematic diagram showing a second scenario of establishing P2P communication based on a DFS channel according to an embodiment of the present application.
[0032] Figure 4 According to an embodiment of the present application, a flow chart of a communication method is shown.
[0033] Figure 5 According to an embodiment of the present application, a schematic diagram of interaction between terminal devices during the process of establishing a P2P connection is shown.
[0034] Figure 6 According to an embodiment of the present application, a schematic diagram of device interaction of a communication method is shown.
[0035] Figure 7 According to an embodiment of the present application, a flow chart of another communication method is shown.
[0036] Figure 8 A schematic diagram of a communication method is shown according to an embodiment of the present application.
[0037] FIG9( a ) shows a schematic diagram of the structure of a DFS dual chip according to an embodiment of the present application.
[0038] FIG9( b ) shows a schematic diagram of an application of a DFS dual chip according to an embodiment of the present application.
[0039] Fig.10 According to an embodiment of the present application, a schematic diagram of the hardware structure of a terminal device is shown. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0041] It should also be stated that the steps in the methods and processes in the embodiments of the present application are numbered for ease of reference, rather than to limit the order of precedence. If there is an order between the steps, the text description shall prevail.
[0042] Figure 2 According to an embodiment of the present application, a schematic diagram of a scenario for executing an interconnected service based on P2P technology is shown.
[0043] It is understood that terminal devices can directly exchange information based on peer-to-peer (P2P) technology to achieve shared computing resources and services. Among them, P2P technology refers to the direct transmission of information between two terminal devices through a channel without the intervention of an intermediate link or server. For example, Figure 2 As shown, the terminal device 100 and the terminal device 200 can realize interconnection services such as wireless collaboration, wireless screen projection, and wireless transmission through P2P technology.
[0044] However, the existing 2.4 GHz frequency band channels can no longer meet the transmission requirements of big data. Therefore, when transmitting big data based on P2P technology, terminal devices expect to occupy channels with larger bandwidth, such as DFS channels in the 5 GHz frequency band.
[0045] As mentioned above, the interconnection service between terminal devices based on P2P technology does not have radar detection capability. Therefore, when the terminal devices communicate using P2P technology, they cannot use the DFS channel in the 5GHz frequency band for data transmission.
[0046] It can be understood that when a terminal device accesses a wireless network through a network device, such as a router, etc., since both the terminal device and the network device have radar detection capabilities, the terminal device can use the DFS channel to transmit data with the network device.
[0047] Therefore, in order to solve the above problems, the embodiment of the present application shows a P2P communication method, which realizes DFS channel transmission for P2P connection with another terminal device by detecting the change of the DFS channel used when data is transmitted between the terminal device and the network device. Specifically, in some embodiments, it can be determined first whether there are two terminal devices to be P2P connected, such as a mobile phone and a computer, and whether there is a terminal device that transmits data with a network device (such as a router) through a DFS channel. If there is a terminal device, such as a computer that transmits data with a router through a DFS channel, assuming that the DFS channel used is DFS1, it indicates that there is no radar signal at present, or the radar signal does not have an overlapping frequency band with DFS1, that is, there is no radar avoidance signal. Therefore, the computer can use DFS1 to establish a P2P connection with the mobile phone.
[0048] In the process of using DFS1 for P2P communication between the computer and the mobile phone, it is also necessary to detect in real time whether the channel used for communication between the computer and the router has changed. For example, if it is detected that the channel used for communication between the computer and the router has switched from the DFS1 channel to the DFS2 channel, it means that the computer has detected a radar signal in the DFS1 channel and needs to avoid the radar. At this time, the channel used for communication between the computer and the mobile phone is also switched from the DFS1 channel to the DFS2 channel. Alternatively, when it is detected that the computer and the router have interrupted the use of the DFS channel for data transmission, the P2P channel used for communication between the computer and the mobile phone is switched from the DFS channel to other non-DFS channels, such as channels in other compliant 5G frequency bands.
[0049] It can be understood that the communication method provided in the embodiment of the present application may be applicable to terminal devices including but not limited to mobile phones, tablet computers, desktops, laptops, handheld computers, netbooks, and augmented reality (AR) and virtual reality (VR) devices, smart TVs, smart watches and other wearable devices, servers, mobile email devices, car equipment, portable game consoles, portable music players, reader devices, televisions embedded or coupled with one or more processors, or other electronic devices capable of accessing the network. The first terminal device and the second terminal device in the embodiment of the present application may include a wireless screen projection APP, a file transfer APP, and a multi-screen interaction APP, that is, the embodiment of the present application may support one or more business scenarios in wireless screen projection, file transfer, and multi-screen interaction.
[0050] In some embodiments, FIG. 3(a) shows a schematic diagram of a first scenario of establishing P2P communication based on a DFS channel according to an embodiment of the present application. Referring to FIG. 3(a), the mobile phone 200 sends a channel selection request to the computer 100 to establish a P2P connection. At this time, it is determined that the computer 100 is transmitting data with the router 300 through any channel in the DFS channel. For example, if the DFS channel used is DFS1, it indicates that there is no radar signal at present, or the radar signal and DFS1 do not have overlapping frequency bands, that is, there is no radar avoidance signal. Therefore, the computer 100 can use DFS1 to establish a P2P connection with the mobile phone 200. Furthermore, in the process of the computer 100 using DFS1 to communicate with the mobile phone 200 for P2P, it is also necessary to detect in real time whether the channel used by the computer 100 to communicate with the router 300 has changed. For example, if it is detected that the channel used by the computer 100 to communicate with the router 300 is switched from the DFS1 channel to the DFS2 channel, it means that the computer 100 detects that there is a radar signal in the DFS1 channel and radar avoidance is required. At this time, the communication channel between the computer 100 and the mobile phone 200 is also switched from the DFS1 channel to the DFS2 channel. Alternatively, when it is detected that the computer 100 and the router 300 have stopped using the DFS channel for data transmission, the P2P channel used for communication between the computer and the mobile phone is switched from the DFS channel to other non-DFS channels.
[0051] In other embodiments, FIG. 3(b) shows a schematic diagram of a second scenario for establishing P2P communication based on a DFS channel according to an embodiment of the present application. As shown in FIG. 3(b), the mobile phone 200 sends a channel selection request to the computer 100 to establish a P2P connection. At this time, it is determined that the computer 100 and the mobile phone 200 both transmit data with the router 300 through any channel in the DFS channel. As shown in FIG. 3(b), the computer 100 transmits data with the router 300 through the DFS1 channel, and the mobile phone 200 transmits data with the router 300 through the DFS2 channel. It can be understood that there are currently no radar signals in the DFS1 and DFS3 channels used above, or the radar signals do not have overlapping frequency bands with DFS1 and DFS3, that is, there is no radar avoidance signal. Therefore, the computer 100 can use any channel in DFS1 or DFS3 to establish a P2P connection with the mobile phone 100. For example, the computer 100 uses DFS1 to establish a P2P connection with the mobile phone 100. Furthermore, when the computer 100 uses DFS1 to communicate with the mobile phone 200 in P2P mode, it is also necessary to detect in real time whether the channel used by the computer 100 to communicate with the router 300 has changed. For example, if it is detected that the channel used by the computer 100 to communicate with the router 300 is switched from the DFS1 channel to the DFS2 channel, it means that the computer 100 has detected a radar signal in the DFS1 channel and needs to avoid the radar. At this time, the P2P channel used by the computer 100 and the mobile phone 200 to communicate is also switched from the DFS1 channel to the DFS2 channel.
[0052] It can be understood that when it is detected that the computer 100 and the router 300 interrupt the use of the DFS channel for data transmission, it can also be detected whether the current mobile phone 200 continues to transmit data with the router 300 through the DFS3 channel. If the mobile phone 200 continues to transmit data with the router 300 through DFS3 at this time, the computer 100 can re-establish a P2P connection with the mobile phone 200 based on DFS3. Further, in the process of the computer using DFS1 to communicate with the mobile phone for P2P, the detection process of whether the channel used by the mobile phone 200 and the router 300 for communication has changed, and the P2P channel switching method are similar to the detection of whether the channel used by the computer 100 and the router 300 for communication has changed, and the P2P channel switching method, and will not be repeated here.
[0053] Combine the following Figure 4 Describe in detail the specific implementation process of the above communication method, Figure 4 According to an embodiment of the present application, a flow chart of a communication method is shown. The communication method can be applied to the interaction of various devices, and the devices implementing the communication method may include a first terminal device, a second terminal device, and a network device.
[0054] The specific steps are as follows:
[0055] 401: The first terminal device receives a channel selection request for establishing a P2P connection.
[0056] It is understandable that when a user needs to share data information of a first terminal device with a second terminal device, a specific operation can be performed to initiate a request for establishing a P2P connection between the first terminal device and the second terminal device, such as a user clicking a function icon or application on the first terminal device for initiating a P2P connection request, such as clicking a wireless screen projection APP, a file transfer APP, and a multi-screen interactive APP, etc., without limitation. Among them, the P2P function can be activated by a user, or it can be automatically activated when the first terminal device is activated, or it can be triggered and activated under specific conditions, without limitation.
[0057] In some embodiments, when the first terminal device detects a request to establish a P2P connection, the first terminal device first discovers the second terminal device by broadcasting, scanning, etc. Further, when the second terminal device receives the broadcast, it sends its basic information to the first terminal device. Then, based on the basic information of the second terminal device, the first terminal device confirms to establish a Bluetooth connection with the second terminal device, and then exchanges information through the Bluetooth connection channel to negotiate the establishment of a P2P connection between the devices.
[0058] It can be understood that after the first terminal device and the second terminal device communicate based on the Bluetooth connection, a channel selection will be performed between the first terminal device and the second terminal device, and P2P communication will be completed based on the selected channel.
[0059] 402: The first terminal device determines whether the first terminal device connects to the network device through the DFS channel to access the wireless network.
[0060] When the first terminal device determines that the first terminal device does not connect to the network device through the DFS channel to access the wireless network, step 403a is executed, and the first terminal device establishes a P2P connection with the second terminal device based on other channels.
[0061] When the first terminal device determines that the first terminal device connects to the network device through the DFS channel to access the wireless network, step 403b is executed, and the first terminal device establishes a P2P connection with the second terminal device based on the DFS channel.
[0062] It can be understood that when the first terminal device accesses the wireless network through a network device, such as a router, etc., since both the first terminal device and the network device have radar detection capabilities, the first terminal device can use the DFS channel to transmit data with the network device. When it is determined that the first terminal device connects to the network device through the DFS channel to access the wireless network, it indicates that there is currently no radar signal on the DFS channel used, or there is no overlapping frequency band between the radar signal and the DFS channel, that is, there is no radar avoidance signal.
[0063] 403a: The first terminal device establishes a P2P connection with the second terminal device based on other channels.
[0064] It can be understood that since the interconnection service between the first terminal device and the second terminal device based on P2P technology does not have radar detection capability, the first terminal device can determine the communication channel between the first terminal device and the network device. When the first terminal device determines that the first terminal device does not connect to the network device through the DFS channel to access the wireless network, the first terminal device establishes a P2P connection with the second terminal device based on other channels. The channel type of the above other channels does not belong to the DFS channel.
[0065] Furthermore, after the first terminal device establishes a P2P connection with the second terminal device based on other channels, it is necessary to continue to perform step 404 to detect changes in the channel used by the first terminal device to communicate with the network device. When it is detected that the channel used by the first terminal device to communicate with the network device is switched to the DFS channel, the P2P channel between the first terminal device and the second terminal device is also switched to the same DFS channel.
[0066] 403b: The first terminal device establishes a P2P connection with the second terminal device based on the DFS channel.
[0067] Exemplarily, in step 402, when the first terminal device determines that the first terminal device connects to the network device through the first DFS channel to access the wireless network, it is determined that there is no radar channel in the DFS channel. At this time, the first terminal device establishes a P2P connection with the second terminal device based on the DFS channel.
[0068] In some embodiments, when a large amount of data needs to be transmitted wirelessly between a first terminal device supporting P2P communication and a second terminal device, the first terminal device can create a virtual access point (SoftAP, SAP) through a built-in wireless network card as a wireless hotspot; the second terminal device can connect to the wireless hotspot as a STA, thereby realizing a P2P connection between the first terminal device and the second terminal device. The specific implementation process of establishing a P2P connection between the first terminal device and the second terminal device will be described below in conjunction with Figure 5 The detailed description will not be repeated here.
[0069] 404: The first terminal device detects that a channel used by the first terminal device to communicate with the network device has changed, and switches a P2P channel between the first terminal device and the second terminal device according to the channel change.
[0070] It can be understood that when the first terminal device accesses the wireless network through the network device, the first terminal device and the network device both have radar detection capabilities. Therefore, when it is detected that the channel used for communication between the first terminal device and the network device has changed, for example, there is a radar signal in the DFS channel used, in order to avoid the radar event, it is necessary to switch from the current DFS1 channel to other DFS channels, such as the DFS2 channel. At this time, the P2P channel used for communication between the first terminal device and the second terminal device is also switched from the DFS1 channel to the DFS2 channel. Alternatively, when it is detected that the first terminal device and the network device interrupt the use of any channel in the DFS channel for data transmission, the P2P channel used for communication between the first terminal device and the second terminal device is switched to other channels, such as other compliant channels on the 5G frequency band.
[0071] In order to better describe the process of establishing a P2P connection between the first terminal device and the second terminal device, Figure 5 Make an introduction. Figure 5 According to an embodiment of the present application, a schematic diagram of interaction between terminal devices during the process of establishing a P2P connection is shown. Figure 5 As shown, the process of establishing a P2P connection between the first terminal device and the second terminal device may include the following steps:
[0072] 501: The first terminal device detects a request to establish a P2P connection.
[0073] It is understandable that when a user needs to share data information of a first terminal device with a second terminal device, a specific operation can be performed to initiate a request for establishing a P2P connection between the first terminal device and the second terminal device, such as a user clicking a function icon or application on the first terminal device for initiating a P2P connection request, such as clicking a wireless screen projection APP, a file transfer APP, and a multi-screen interactive APP, etc., without limitation. Among them, the P2P function can be activated by a user, or it can be automatically activated when the first terminal device is activated, or it can be triggered and activated under specific conditions, without limitation.
[0074] In some embodiments, as described above, when the first terminal device detects a request to establish a P2P connection, the first terminal device first discovers the second terminal device by broadcasting, scanning, etc. Further, when the second terminal device receives the broadcast, it sends its own basic information to the first terminal device. Then, based on the basic information of the second terminal device, the first terminal device confirms to establish a Bluetooth connection with the second terminal device, and then exchanges information through the Bluetooth connection channel to negotiate the establishment of a P2P connection between the first terminal device and the second terminal device. The above-mentioned Bluetooth can be, for example, ordinary Bluetooth or low-power Bluetooth (bluetooth low energy, BLE), which is not limited here.
[0075] 502: The first terminal device creates a SAP on the DFS path used by the first terminal device and the network device.
[0076] It can be understood that when the first terminal device connects to the network device through any channel in the DFS channel to access the network, the first terminal device can create SAP by default as a wireless hotspot, and create SAP in the DFS channel used by the first terminal device and the network device, and the second terminal device acts as a STA device. In some embodiments, the user's operation instruction can also specify that the first terminal device creates SAP as a wireless hotspot, which is not limited here.
[0077] 503: The first terminal device and the second terminal device establish a P2P connection based on SAP.
[0078] It can be understood that the first terminal device as the sending end creates SAP as a wireless hotspot. Further, the second terminal device as a STA role can be connected to the virtual AP created by the first terminal device. It can be understood that when the second terminal device is connected to the SAP created by the first terminal device, the first terminal device and the second terminal device successfully establish a P2P connection.
[0079] Specifically, in the embodiment of the present application, two roles are defined in the P2P architecture:
[0080] The first terminal device is the group owner (GO) and also plays the role of a virtual access point (soft, SAP) in the P2P network;
[0081] The second terminal device is both a group client (GC) and a station (STA) in the P2P network.
[0082] In some embodiments, a user can input an instruction to the first terminal device, which is used to instruct the first terminal device to be used as a GO node in the WiFi P2P network, that is, a SAP role. After designating the first terminal device as a GO node, the second terminal device is a GC node, that is, a STA role. Then, the first terminal device and the second terminal device can exchange basic information of the P2P connection through broadcast packets. After the first terminal device and the second terminal device exchange basic information, a P2P connection can be established based on the basic information. The above-mentioned link establishment information includes channel selection information, service set identifier (SSID) and password, MAC address of the first terminal device and MAC address of the second terminal device, etc.
[0083] It can be understood that when the first terminal device informs the second terminal device of the DFS channel, the first terminal device and the second terminal device agree to shake hands on the DFS channel. At this time, Password and SSID are the information needed when the first terminal device and the second terminal device shake hands on the DFS channel. The MAC address of the first terminal device and the MAC address of the second terminal device are both parameters required for P2P connection. Furthermore, after the first terminal device and the second terminal device successfully shake hands, a P2P connection is established.
[0084] The specific implementation process of the communication method provided in this application is described in detail below in conjunction with the relevant drawings of the interaction process.
[0085] Understandably, Figure 6 Each step of the implementation process shown may involve the interaction between the computer 100, the mobile phone 200 and the router 300. It should also be stated that the numbering of the steps in the method and process in the embodiments of the present application is for the convenience of reference, rather than limiting the order of precedence. If there is an order between the steps, the text description shall prevail.
[0086] like Figure 6 As shown, the implementation process may include the following steps:
[0087] 601: The computer 100 receives a channel selection request for establishing a P2P connection.
[0088] It can be understood that the description of step 601 can refer to the relevant description of the above step 401, and will not be repeated here.
[0089] 602: The computer 100 determines to connect to the router 300 through the first DFS channel to access the wireless network.
[0090] It can be understood that when the computer 100 accesses the wireless network through a network device, such as a router, etc., since both the computer 100 and the router 300 have radar detection capabilities, the computer 100 can use the DFS channel to transmit data with the router 300. When it is determined that the computer 100 connects to the wireless network by connecting the network device through the first DFS channel, it indicates that there is currently no radar signal on the first DFS channel used, or there is no overlapping frequency band between the radar signal and the first DFS channel, that is, there is no radar avoidance signal.
[0091] 603: The computer 100 establishes a P2P connection with the mobile phone 200 based on the first DFS channel.
[0092] It can be understood that the specific implementation process of the computer 100 establishing the P2P connection with the mobile phone 200 based on the first DFS channel can refer to the relevant descriptions in the above steps 501 to 503, which will not be repeated here.
[0093] 604: During the communication between the computer 100 and the router 300 based on the first DFS channel, when a radar signal is detected on the first channel, the computer 100 switches to the second DFS channel for communication.
[0094] It can be understood that when a radar signal is detected in the first DFS channel used by the computer 100 to communicate with the router 300, in order to avoid the radar event, it is necessary to switch from the first DFS channel to the second DFS channel. At this time, the P2P channel used by the computer 100 and the mobile phone 200 to communicate is also switched from the first DFS channel to the second DFS channel.
[0095] 605: The computer 100 switches the P2P channel from the first DFS channel to the second DFS channel.
[0096] It can be understood that when it is detected that the channel used by the computer 100 to communicate with the router 300 is switched from the first DFS channel to the second DFS channel, it indicates that there is a radar signal in the first DFS channel. Therefore, the computer 100 switches the P2P channel from the first DFS channel to the second DFS channel.
[0097] 606: The computer 100 stops using the DFS channel to connect to the router 300 to access the wireless network.
[0098] It can be understood that when the computer 100 stops using the DFS channel to connect to the router 300 to access the wireless network, for example, the computer 100 no longer accesses the wireless network, or the computer 100 connects to the router 300 to access the wireless network based on other channels, such as channels that do not belong to the DFS channel. The P2P channel used for communication between the computer 100 and the mobile phone 200 is switched to the same or different channel that does not belong to the DFS channel, such as other compliant channels in the 5G frequency band.
[0099] 607: The computer 100 switches the P2P channel from the DFS channel to the non-DFS channel.
[0100] It can be understood that when the computer 100 interrupts the use of the DFS channel to connect to the router 300 to access the wireless network. Since the interconnection service between the computer 100 and the mobile phone 200 based on P2P technology does not have the ability to detect radar, it is impossible to know whether the DFS channel includes radar signals. If at this time, the computer 100 and the mobile phone 200 continue to transmit data based on the DFS channel, the radar signal cannot be detected, and thus the radar signal cannot be avoided. Therefore, the computer 100 needs to switch the P2P channel from the DFS channel to a non-DFS channel, such as other compliant channels in the 5G frequency band.
[0101] In some embodiments, when it is detected that the computer 100 and the router 300 interrupt the use of the DFS channel for data transmission, it is also possible to detect whether the current mobile phone 200 continues to transmit data with the router 300 through the third DFS channel. If the mobile phone 200 continues to transmit data with the router 300 through the third DFS channel, the computer 100 can re-establish a P2P connection with the mobile phone 200 based on the third DFS channel.
[0102] Figure 7 According to an embodiment of the present application, a flow chart of another communication method is shown. Figure 7 As shown, the implementation process may include the following steps:
[0103] 701: Receive a full-scenario service channel selection request.
[0104] It can be understood that the above-mentioned full-scenario service (ie, interconnected service) is implemented based on the P2P connection between the first terminal device and the second terminal device. Step 701 can refer to the relevant description in the above-mentioned step 401, and will not be repeated here.
[0105] 702: Determine whether the STA occupies the DFS channel.
[0106] It can be understood that the first terminal device connects to the network device through any channel in the DFS channel to access the wireless network. At this time, the first terminal device acts as a STA device and the network device acts as a hotspot (access point, AP) device.
[0107] When the first terminal device occupies the DFS channel as a STA, step 703 is executed, and the first terminal device creates a SAP on the DFS channel.
[0108] When the first terminal device as a STA does not occupy the DFS channel, step 707 is executed to create a SAP on another compliant channel by the first terminal device.
[0109] 703: SAP starts in the DFS channel.
[0110] It can be understood that when step 702 is executed and it is determined that the first terminal device connects to the network device through the DFS channel to access the network, for example, the first DFS channel is used. Since both the first terminal device and the network device have radar monitoring capabilities, at this time, it indicates that there is no radar signal on the first DFS channel used. Therefore, the first terminal device can create a SAP on the DFS channel, for example, the first terminal device creates a SAP on the first DFS channel.
[0111] 704: Determine whether a radar signal backoff event sent by the STA is received.
[0112] It can be understood that when a radar signal backoff event is received from the first terminal device as a STA, step 706 is executed, and the first terminal device switches the SAP to the same channel following the STA. When a radar signal backoff event is received from the first terminal device as a STA, step 705 is executed to determine whether a link disconnection event of the first terminal device as a STA is received.
[0113] It can be understood that in the embodiment of the present application, there is no order restriction for step 704 and step 705. Step 704 can be executed first, and then step 705; or step 705 can be executed first, and then step 704.
[0114] 705: Determine whether a STA disconnection event is received.
[0115] It is understandable that since the interconnection service between the first terminal device and the second terminal device based on P2P technology does not have radar detection capability, it is necessary to detect in real time the changes in the DFS channel used when data is transmitted between the first terminal device and the network device. When the first terminal device is received as a STA disconnection event, step 707 is executed, and the first terminal device switches the SAP to other compliant channels.
[0116] When no STA disconnection event is received from the first terminal device, step 703 is executed, and the first terminal device creates a SAP on the DFS channel.
[0117] 706: SAP switches to the same channel with STA.
[0118] It can be understood that since the interconnection service between the first terminal device and the second terminal device based on P2P technology does not have radar detection capability, the P2P channel needs to change according to the change of the communication channel between the first terminal device and the network device. Therefore, when the first terminal device receives a radar signal backoff event sent by the first terminal device as a STA, the first terminal device switches SAP to the same channel following the STA. For example, when it is detected that the channel used by the first terminal device to communicate with the network device is switched from the first DFS channel to the second DFS channel, it indicates that there is a radar signal in the first DFS channel. Therefore, the first terminal device switches the P2P channel from the first DFS channel to the second DFS channel.
[0119] 707: SAP switches to / creates another compliance channel.
[0120] It can be understood that when the first terminal device as a STA does not connect to the network device through the DFS channel to access the wireless network, or when the first terminal device interrupts the communication with the network device through the DFS channel, the first terminal device no longer establishes a P2P connection with the second terminal device based on the DFS channel. At this time, the first terminal device can establish a P2P connection with the second terminal device based on other compliant channels.
[0121] It is understood that in some embodiments, the first terminal device and the second terminal device can be configured in the framework layer in the software architecture to implement the software program for creating P2P communication in the DFS channel, or by configuring a small chip for implementing the creation of P2P communication in the DFS channel in the hardware structure to support the terminal device to create P2P communication in the DFS channel. In the present application, the first terminal device can send a request to the second terminal device through a near field communication method such as Bluetooth, near field communication technology (NFC), etc. to obtain whether the second terminal device supports the creation of P2P communication in the DFS channel.
[0122] Combined with the above Figure 7 The flowchart shown, Figure 8 A schematic diagram of a communication method is shown according to an embodiment of the present application.
[0123] Specifically, Figure 8 The steps shown are as follows:
[0124] 801: A first terminal device establishes a BLE connection with a second terminal device.
[0125] It is understandable that when the first terminal device expects to establish a P2P connection with the second terminal device, a BLE connection may be established between the first terminal device and the second terminal device. Specifically, the first terminal device and the second terminal device establish a BLE connection including steps 801a and 801b:
[0126] 801a: The first terminal device scans and discovers the second terminal device through BLE.
[0127] First, the first terminal device broadcasts a scanning signal via BLE, and when the second terminal device receives the broadcast scanning signal, it sends its own basic information to the first terminal device. Then, the first terminal device receives the basic information of the second terminal device.
[0128] 801b: The first terminal device and the second terminal device establish a link and pair via BLE.
[0129] It can be understood that based on step 801b, the first terminal device has scanned and discovered the second terminal device through BLE. In some embodiments, the first terminal device will display the scanned and discovered terminal devices to the user, and the user can select a suitable terminal device to establish a link and pair according to the displayed content. For example, the user selects the second terminal device, and in response to the user's operation, the first terminal device and the second terminal device establish a link and pair through BLE.
[0130] 802: The first terminal device and the second terminal device perform channel selection and GO negotiation.
[0131] It can be understood that before establishing a P2P connection, an advanced GO negotiation is required to determine the role of the terminal device in the P2P connection. At the same time, it is also necessary to determine the channel for data transmission. Specifically, the first terminal device and the second terminal device establish channel selection and GO negotiation including steps 802a and 802c:
[0132] 802a: The first terminal device sends a GO negotiation request to the second terminal device.
[0133] 802b: The second terminal device sends a GO negotiation response to the first terminal device.
[0134] It can be understood that in the embodiment of the present application, the first terminal device has connected to the network device through the DFS channel to access the wireless network. Therefore, when the first terminal device connects to the network device through any channel in the DFS channel to access the network, the first terminal device can be used as the GO by default without knowing the networking status of the second terminal device, and the corresponding second terminal device is used as the GC.
[0135] 802c: The first terminal device selects a channel and creates a GO / GC.
[0136] It is understood that the first terminal device can create SAP on the DFS channel used by the first terminal device and the network device, that is, the first terminal device selects the above DFS channel as the channel for P2P data transmission. And, based on the above steps 802a and 802b, the first terminal device is determined as the GO and the second terminal device is determined as the GC.
[0137] 803: The first terminal device establishes a P2P link with the second terminal device.
[0138] It can be understood that the first terminal device and the second terminal device can exchange P2P connection establishment information through broadcast packets, and after the first terminal device and the second terminal device exchange and obtain the link establishment information, the P2P connection can be established according to the link establishment information. The above-mentioned link establishment information includes channel selection information, service set identifier (SSID) and password, media access control address (MAC) of the first terminal device and MAC address of the second terminal device, etc.
[0139] It can be understood that when the first terminal device informs the second terminal device of the selected DFS channel, the first terminal device and the second terminal device agree to shake hands on the selected DFS channel. At this time, Password and SSID are the information needed when the first electronic device and the second electronic device shake hands on the first DFS channel. The MAC address of the first electronic device and the MAC address of the second electronic device are both parameters needed to be used in the P2P connection. Furthermore, after the first terminal device and the second terminal device successfully shake hands, a P2P connection is established.
[0140] The software architecture of the chip under DFS is described in detail below in conjunction with FIG9(a), which shows an architecture diagram of a DFS dual chip according to an embodiment of the present application. As shown in FIG9(a), the software architecture of the DFS dual chip shown in FIG9(a) mainly includes: an application layer, an operating system, an application program interface, a main chip, and a small chip.
[0141] The application package may include applications such as wireless screen projection APP, file transfer APP, and multi-screen interactive APP. Of course, the application layer may also include other application packages, such as payment APP, shopping APP, banking APP, etc., which are not limited in this application.
[0142] It can be understood that the application program interface is used to provide an interface between the application layer and the chiplet, so that the application of the application layer can establish P2P communication based on the DFS signal based on the function of the chiplet. For example, the wireless transmission application of the first terminal device can establish a P2P connection with the second terminal device based on the DFS signal based on the chiplet.
[0143] The main chip includes: main chip driver (WIFI miniport driver), hardware abstraction layer (HAL) and wireless firmware layer 1 (Intel FW).
[0144] The main chip driver (WIFI miniport driver) can be used to drive the software program to mobilize the hardware device, or the main chip driver can also serve as an interface between the hardware and the operating system, so that the operating system can control and manage the wireless network connection. For example, in this application, the first terminal device connects to the network device based on the first DFS channel to access the wireless network to achieve data transmission.
[0145] The hardware abstraction layer encapsulates the driver, provides an interface to the upper layer, and shields the implementation details of the low-level hardware.
[0146] Wireless firmware 1 is a program executed by the terminal device itself. Wireless firmware is generally stored in the flash of the device. For cost and convenience reasons, the running program of the terminal device is usually packaged into a firmware file in a specific format, stored in the terminal system, and the hardware device in the terminal device is upgraded through the terminal system. In addition, wireless firmware can also be used to implement communication protocols with other devices, such as Bluetooth, Zigbee, etc. In addition, wireless firmware 1 also has the functions of processing data transmission, decoding, encryption, etc., to ensure that the terminal device can communicate effectively with other terminal devices.
[0147] In addition, the main chip also includes Bluetooth. The terminal device can establish a communication connection with other terminal devices via Bluetooth.
[0148] It can be understood that the small chip includes: small chip driver (minichip lan driver), protocol stack (minichipwifi stack), wireless firmware 2 (minichip wifi fw).
[0149] Among them, the minichip lan driver is used to connect and manage the terminal device network, which can provide high-speed data transmission, network management and security functions, and enable multiple terminal devices to share resources, work together and communicate with each other. For example, in the embodiment of the present application, the interconnection service between the first terminal device and the second terminal device is realized through P2P technology.
[0150] The protocol stack (minichip wifi stack) is generally composed of multiple protocol layers, and each protocol layer is responsible for different functions and tasks. Common WIFI protocol stack includes physical layer (PHY), data link layer (MAC) and transport layer (TCP / UDP), network layer (IP), etc., and these basic protocol hierarchical structures are similar. Through the collaborative work of these protocol layers, wireless communication and Internet access functions can be realized. For example, in the embodiment of the present application, the first terminal device is a wireless communication function realized by point-to-point connection between SAP and the second terminal device.
[0151] Wireless firmware 2 is similar to wireless firmware 1, and is a program executed by the terminal device itself. In the embodiment of the present application, for example, the first terminal device establishes a Bluetooth connection with the second terminal device through wireless firmware 2.
[0152] It can be understood that the embodiment of the present application proposes a small chip, which can realize the function of establishing a P2P connection based on the DFS channel that the main chip cannot realize. Specifically, the application layer can directly connect the small chip through the application program interface to realize the function of establishing a P2P connection between terminal devices based on the DFS channel. In some embodiments, the operating system of the first terminal device can respond to the operation of the application layer and control the main chip to communicate with the network device based on the DFS channel. At this time, the small chip detects and follows the main chip to use the DFS channel, and the first terminal device and the second terminal device establish a P2P connection based on the DFS channel. As shown in Figure 9 (b), the function of the computer 100 connecting to the router 300 to access the wireless network based on the DFS channel is realized by the main chip. When the small chip detects and determines that the computer 100 connects to the router 300 through the DFS channel to access the wireless network, the small chip can feed back the detected information to the computer 100, and the computer 100 establishes a P2P connection with the mobile phone 200 through the DFS channel. Furthermore, when the computer 100 uses the DFS channel to perform P2P communication with the mobile phone 200, the small chip also needs to detect in real time whether the channel used by the computer 100 to communicate with the router 300 has changed.
[0153] It can be understood that the communication channel between the mobile phone 200 and the router 300 is not restricted, and any compliant channel can be used for communication, such as the DFS channel shown in Figure 9(b). It can be understood that the chiplet has its own logic, and in certain scenarios, it can not only occupy the DFS channel to establish a P2P connection, but also does not violate regulations. In addition, the chiplet has a simple structure and low manufacturing cost, which makes it easier to achieve large-scale applications.
[0154] Fig.10 According to an embodiment of the present application, a schematic diagram of the hardware structure of a terminal device is shown.
[0155] like Fig.10As shown, the terminal device 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.
[0156] 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 limiting the terminal device. In other embodiments of the present application, the terminal device 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.
[0157] 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.
[0158] 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.
[0159] It can be understood that in the embodiment of the present application, the processor can be used to execute the method steps executed by the first terminal device or the second terminal device in the P2P communication method of the present application.
[0160] 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.
[0161] 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 solutions for wireless communications including 2G / 3G / 4G / 5G applied to terminal devices. The mobile communication module 130 may receive electromagnetic waves by an antenna, filter, amplify, and process the received electromagnetic waves, and transmit them to a 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.
[0162] 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 terminal device. The terminal device can communicate with the network and other devices through wireless communication technology.
[0163] In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the terminal device may also be located in the same module.
[0164] 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.
[0165] 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.
[0166] 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.
[0167] 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, which is then passed to the image signal processing (ISP) to be converted into a digital image signal. The terminal device can realize the shooting function through the ISP, the camera 170, the video codec, the graphics processing unit (GPU), the display screen 102, and the application processor.
[0168] 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 terminal device. The external memory card communicates with the processor 110 through the external memory interface to implement the data storage function. The universal serial bus interface is used for the terminal device to communicate with other electronic devices.
[0169] In some embodiments, the terminal device 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 terminal device 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.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] 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.
[0175] 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.
[0176] 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.
[0177] 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.
[0178] References to "one embodiment" or "an embodiment" in the specification mean that the specific features, structures, or characteristics described in conjunction with the embodiment are included in at least one exemplary implementation or technology disclosed according to the embodiment of the present application. The appearance of the phrase "in one embodiment" in various places in the specification does not necessarily all refer to the same embodiment.
[0179] 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: Point-to-point communication is performed between the first terminal device and the second terminal device, and the first terminal device accesses the wireless network through the first network device; In response to detecting that the first terminal device communicates with the first network device through the first channel, the first terminal device uses the first channel to perform point-to-point communication with the second terminal device, wherein the first channel is a first dynamic frequency selection channel; In response to detecting that the first terminal device switches from the first channel to the second channel to communicate with the first network device, the first terminal device uses the third channel to perform point-to-point communication with the second terminal device.
2. The method according to claim 1, characterized in that The third channel and the second channel are both second dynamic frequency selection channels.
3. The method according to claim 1, characterized in that The types of the third channel and the second channel do not belong to dynamic frequency selection channels, and the third channel is the same as or different from the second channel.
4. The method according to claim 2, characterized in that: Also includes: The first terminal device detects a first operation of establishing point-to-point communication with a second terminal device; The first terminal device detects whether the type of the communication channel with the first network device belongs to a dynamic frequency selection channel.
5. The method according to claim 4, characterized in that Also includes: Corresponding to the first terminal device detecting that the type of the communication channel with the first network device is a non-dynamic frequency selection channel, the first terminal device uses the non-dynamic frequency selection channel to perform point-to-point communication with the second terminal device.
6. The method according to claim 4, characterized in that The first terminal device detects a first operation of establishing point-to-point communication with the second terminal device, further comprising: In response to the first operation, the first terminal device establishes a Bluetooth connection with the second terminal device; The first terminal device sends negotiation information to the second terminal device based on the Bluetooth connection, wherein the negotiation information is used to determine a channel for point-to-point communication between the first terminal device and the second terminal device, and to determine: the first terminal device serves as a group owner device and the second terminal device serves as a group client device.
7. The method according to claim 6, characterized in that Also includes: The first terminal device creates a first virtual access point on a first channel of point-to-point communication between the first terminal device and the second terminal device; The first terminal device sends basic information of the first virtual access point to the second terminal device; wherein the basic information at least includes a service set identifier and a password; The second terminal device connects to the first virtual access point based on the basic information; The first terminal device and the second terminal device establish point-to-point communication based on the first virtual access point and the dynamic frequency selection channel.
8. The method according to claim 3, characterized in that Also includes: In response to detecting that the channel used by the first terminal device to communicate with the first network device is switched from the second channel to the first channel, the first terminal device switches the first virtual access point to the first channel.
9. 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-8.
10. A readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the communication method according to any one of claims 1 to 8.