File transmission method and electronic equipment
The DFS channel availability is determined through non-CAC detection, skipping the channel detection process, directly using the DFS channel for file transmission, and concurrently using multi-band channels, solving the problem of low DFS channel transmission efficiency and achieving more efficient file transmission.
Patent Information
- Application Number
- CN202311055389.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2043-08-21
AI Technical Summary
When using the Dynamic Frequency Selection (DFS) channel for file transfer, electronic devices need to perform channel validity detection (CAC), resulting in reduced file transfer efficiency.
Determine whether the DFS channel is available through non-CAC detection, skip one CAC detection, directly use the DFS channel for file transmission, and use the 160M bandwidth 5G channel and 40M bandwidth 2.4G channel for file transmission concurrently when necessary.
Improves file transfer efficiency, reduces CAC detection time, improves transmission rate, and makes full use of multi-band channel resources.
Smart Images

Figure CN119496777A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal and communication technology, and in particular to a file transmission method and an electronic device. Background Art
[0002] The sharing application of the electronic device provides the electronic device with the function of sharing files and other data with other electronic devices. When sharing files, the electronic device can use a 5Ghz channel with a bandwidth of 80Mhz bandwidth (abbreviated as 80M bandwidth) to transfer files to other electronic devices.
[0003] With the continuous development of communication technology, the wireless communication standard of the Institute of Electrical and Electronics Engineers (IEEE) 802.11ac has gradually been widely used. In the IEEE802.11ac standard, electronic devices can use dynamic frequency selection (DFS) channels (5Ghz channels with 160Mhz bandwidth (abbreviated as 160M bandwidth)) to communicate with other electronic devices, thereby improving the efficiency of file transmission. Since the operating frequency bands of the global radar system are 5.25Ghz-5.35Ghz and 5.47Ghz-5.725Ghz, when communicating through the DFS channel, the DFS channel may include radar signals involved in the global radar system. In order to prevent communication interference between electronic devices using the DFS channel and the global radar system, the electronic device needs to perform a channel availability check (CAC) on the DFS channel that may include radar signals before communicating based on the DFS channel. When it is determined through CAC detection that the DFS channel does not include radar signals, the electronic device can perform file transmission based on the DFS channel. However, during the CAC detection process, the electronic device cannot perform file transfer based on the DFS channel. The execution time of the CAC detection is 1 minute. This means that within this 1 minute, even if the electronic device receives a file transfer instruction, it cannot perform file transfer, which reduces the efficiency of file transfer.
[0004] How to improve the efficiency of file transfer is worth discussing. Summary of the invention
[0005] The present application provides a file transfer method and electronic device, and the electronic device can determine whether a DFS channel is available by non-CAC detection. When the DFS channel is available, the electronic device 100 skips a CAC detection and directly uses the DFS channel to start 5GP2P to establish a communication connection with the electronic device 200, and the electronic device can also use a 2.4G channel with a 40M bandwidth to start a 2.4GsoftAP communication connection. Subsequently, files are transferred concurrently using a P2P link and a softAP link. Implementing the technical solution provided by the present application can improve the efficiency of file transfer.
[0006] In a first aspect, the present application provides a file transfer method, the method comprising: in response to an operation of sharing a file, a first electronic device determines that there is a routing device using a dynamic frequency selection DFS channel, and when it is determined that the first electronic device is indoors, closes the channel availability detection CAC and establishes a first communication connection with a second electronic device based on the DFS channel, and the DFS channel is a 5G channel of a first bandwidth; wherein the routing device is used to determine whether the DFS channel is available after performing the CAC detection at the first frequency; the file is greater than a preset threshold; the first electronic device sends the file to the second electronic device through the 5G channel of the first bandwidth based on the first communication connection.
[0007] In the above embodiment, the first electronic device may be the electronic device 100 involved in the following embodiment, and the second electronic device may be the electronic device 200 involved in the following embodiment. The first bandwidth may be the 160M bandwidth involved in the following embodiment. Compared with the solution of using 80M bandwidth for file transfer, using 160M bandwidth for file transfer can double the transmission rate. And when performing file transfer, using a non-CAC detection method to determine that the DFS channel is available can save the time involved in CAC detection (usually 1 minute).
[0008] In combination with the first aspect, in some embodiments, when the first electronic device determines that there is a routing device using a dynamic frequency selection DFS channel and determines that the first electronic device is indoors, the method also includes: the first electronic device turning off a wireless local area network WLAN service.
[0009] In the above embodiment, the WLAN service that is closed here is other services that need to use 5G channels or 2.4G channels except file transmission. The first electronic device closes the WLAN service to prevent the WLAN service from interfering with file transmission during data transmission.
[0010] In combination with the first aspect, in some embodiments, the first electronic device sends the file to the second electronic device through the 5G channel of the first bandwidth based on the first communication connection, specifically including: sending the first part of the file to the second electronic device through the 5G channel of the first bandwidth based on the first communication connection; after closing the WLAN service, when establishing a first communication connection with the second electronic device based on the DFS channel, the method also includes: the first electronic device also establishes a second communication connection with the second electronic device based on the 2.4G channel of the second bandwidth; sending the second part of the file to the second electronic device through the 2.4G channel of the second bandwidth based on the second communication connection; the second part is the part of the file other than the first part.
[0011] In the above embodiment, the first part of the file may be the subfile 11 involved in the following embodiment, and the second part of the file may be the subfile 21 involved in the following embodiment. The second bandwidth may be the 40M bandwidth or 20M bandwidth involved in the following embodiment, etc. Among them, in two-way transmission, the first electronic device may divide the file into two subfiles, and use two channels (including a 5G channel and a 2.4G channel) to transmit concurrently to improve the efficiency of file transmission. When a 5G channel with a bandwidth of 160M and a 2.4G channel with a bandwidth of 40M are used concurrently, the real-time transmission rate of the first electronic device can be increased from 60MB / s to 150MB / s compared to a 5G channel with a bandwidth of 80M.
[0012] In combination with the first aspect, in some embodiments, before the first electronic device turns off the wireless local area network WLAN service, the method also includes: the first electronic device displays a prompt message, the prompt message is used to prompt whether to turn off the WLAN service when transmitting the file; and detects the operation of turning off the WLAN service.
[0013] In the above embodiment, since the transmission time is usually long when the file is a large file, a prompt message may be displayed to provide the user with a choice of whether to close the WLAN service.
[0014] In combination with the first aspect, in some embodiments, the prompt information also includes the time required to transmit the file.
[0015] In the above embodiment, providing the time required for file transmission can further help the user analyze whether to choose to turn off the WLAN service. The time required for file transmission is determined by the first electronic device based on the channel used for file transmission and the size of the file. When the channels used are the same, the larger the file, the greater the transmission rate.
[0016] In combination with the first aspect, in some embodiments, after establishing the first communication connection with the second electronic device based on the DFS channel, the method further includes: the first electronic device turning on the CAC detection.
[0017] In combination with the first aspect, in some embodiments, the method also includes: in response to an operation of sharing a file, when the first electronic device determines that there is no routing device using the DFS channel, or determines that the first electronic device is not indoors, a first communication connection is established with the second electronic device based on a 5G channel of a third bandwidth, and a second communication connection is established with the second electronic device based on a 2.4G channel of the second bandwidth; the third bandwidth is smaller than the first bandwidth; based on the first communication connection, a third part of the file is sent to the second electronic device through the 5G channel of the third bandwidth, and based on the second communication connection, a fourth part of the file is sent to the second electronic device through the 2.4G channel of the second bandwidth; the fourth part is the part of the file other than the third part.
[0018] In the above embodiment, the third bandwidth here can be the 80M bandwidth involved in the following embodiment. The third part of the file can be the subfile 12 involved in the following embodiment, and the fourth part of the file can be the subfile 22 involved in the following embodiment. Here, subfile 12 is smaller than subfile 11. Subfile 22 is larger than subfile 21.
[0019] In combination with the first aspect, in some embodiments, after determining that the file transfer is completed, the first electronic device enables the WLAN service.
[0020] In combination with the first aspect, in some embodiments, the first communication connection includes a point-to-point P2P connection, and the second communication connection includes a soft access point softAP connection.
[0021] In combination with the first aspect, in some embodiments, the ratio of the size of the first part in the file to the size of the second part in the file is determined based on the data transmission rate on the 5G channel of the first bandwidth and the data transmission rate on the 2.4G channel of the second bandwidth.
[0022] In combination with the first aspect, in some embodiments, the ratio of the size of the first part in the file to the size of the second part in the file is equal to the rounded value of the ratio of the data transmission rate on the 5G channel of the first bandwidth to the data transmission rate on the 2.4G channel of the second bandwidth.
[0023] In the above embodiment, the file division is determined based on the ratio of the data transmission rates of the channels, so that the 5G channel and the 2.4G channel can be balanced for file transmission, and both channels (including the 5G channel and the 2.4G channel) are in the transmission state to the maximum extent, thereby fully utilizing the channels.
[0024] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method implemented in the first aspect.
[0025] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute the method implemented in the first aspect.
[0026] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the processor is used to call computer instructions so that the electronic device executes the method implemented in the first aspect.
[0027] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method implemented in the first aspect.
[0028] It is understandable that the electronic device provided in the second aspect, the computer storage medium provided in the third aspect, the chip system provided in the fourth aspect, and the computer program product provided in the fifth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, other beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1A as well as Figure 1B A set of exemplary user interfaces involved in transferring files by the electronic device 100 is shown;
[0030] Figure 2 A schematic diagram of file transmission between electronic device 100 and electronic device 200;
[0031] Figure 3 is an exemplary system structure block diagram of the electronic device 100 in some embodiments;
[0032] Figure 4 A flowchart of interaction between internal modules when the electronic device 100 transfers a file to the electronic device 200 is shown;
[0033] Figure 5 An exemplary flow chart of the process of transferring a file from the electronic device 100 to the electronic device 200 is shown;
[0034] Figure 6An exemplary flow chart showing the electronic device 100 determining whether a DFS channel is available;
[0035] Figure 7 A schematic diagram showing the types of communication involved when the electronic device 100 transmits a file to the electronic device 200;
[0036] Figure 8 It is a schematic diagram of the structure of the electronic device 100 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.
[0038] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0039] In one solution, when the electronic device 100 detects a file sharing operation, if condition 1 is met, it can skip a CAC detection and directly use the DFS channel (5G channel with 160M bandwidth) for file transfer. If condition 1 is not met, the electronic device 100 uses the 5G channel with 80M bandwidth to transfer the file to the electronic device 200.
[0040] Among them, condition 1 is used for the electronic device 100 to determine whether the DFS channel includes a radar signal when the electronic device 100 uses the DFS channel by other means other than CAC detection. The condition 1 at least includes condition 11: in response to the operation of sharing files, the electronic device 100 determines that there is a routing device using the DFS channel, and determines that the electronic device 100 is indoors. Among them, the routing device is used to determine whether the DFS channel is available after performing CAC detection at a preset frequency (also referred to as the first frequency). In some possible cases, the condition 1 may also include, in addition to condition 11: the file to be transmitted is larger than a preset threshold, such as 1GB.
[0041] In the foregoing, the electronic device 100 uses the DFS channel (5G channel with a bandwidth of 160M) for file transfer, including: the electronic device 100 initiates a 5G peer-to-peer (P2P) communication with a bandwidth of 160M. Then, the electronic device 100 establishes a P2P communication connection with the electronic device 200 based on the DFS channel. Based on the P2P communication connection, the file is then transferred to the electronic device 200 through the DFS channel. The electronic device 100 uses the 5G channel with a bandwidth of 80M to transfer the file to the electronic device 200, including: the electronic device 100 initiates a 5GP2P communication with a bandwidth of 80M. Then, the electronic device 100 establishes a P2P communication connection with the electronic device 200 based on the 5G channel with a bandwidth of 80M. Based on the P2P communication connection, the file is then transferred to the electronic device 200 through the 5G channel with a bandwidth of 80M.
[0042] Because the routing devices around the electronic device 100 will first perform CAC detection in accordance with the IEEE802.11ac communication standard before using the DFS channel to determine whether the DFS channel is available, if it is available, the routing device will use the DFS channel for communication. It is possible to use the possibility of the DFS channel being available to determine whether there are routing devices around the electronic device 100 that use the DFS channel. At the same time, it is determined that the electronic device 100 uses the DFS channel indoors because the requirements for the use of the DFS channel indoors are lower than those for outdoor use. The use of the DFS channel indoors by the electronic device 100 is conducive to ensuring the reliability of file transmission. Moreover, compared with using a 5Ghz channel with an 80M bandwidth for file transfer, reducing the CAC detection by 1 minute but still using the DFS channel for file transfer can improve the efficiency of file transfer.
[0043] It can also be understood that the electronic device 100 determines whether to use the DFS channel by whether condition 1 is satisfied through a non-CAC detection method. The non-CAC detection method may include determining whether there is a routing device using the DFS channel and determining whether the electronic device 100 is indoors. The non-CAC detection method is faster than the CAC detection, so that the electronic device 100 can start file transfer faster.
[0044] In some possible cases, in response to the operation of sharing files, the electronic device 100 can turn off the WLAN service. Because the WLAN service of the electronic device 100 can communicate based on the 5G channel. If the frequency band range of the 5G channel (160M bandwidth or 80M bandwidth) used for file transfer overlaps with the frequency band range of the 5G channel used by the WLAN service, the WLAN service will interfere with the file transfer. Turning off the WLAN service can prevent the WLAN service from interfering with file transfer.
[0045] In other possible cases, for an electronic device 100 that supports dual-band dual-channel (DBDC), when performing file transfer, in addition to using a 5G channel (160M bandwidth or 80M bandwidth), a 2.4G channel can also be used concurrently to transfer files simultaneously. In this way, the efficiency of file transfer can be further improved. At this time, in addition to establishing a P2P communication connection with an electronic device 200 based on a 5G channel (160M bandwidth or 80M bandwidth), the electronic device 100 can also establish a softAp communication connection with the electronic device 200 based on a 2.4G channel (40M bandwidth). Then, the electronic device 100 sends a part of the file to the electronic device 200 through the 5G channel (160M bandwidth or 80M bandwidth) based on the P2P communication connection, and sends another part of the file to the electronic device 200 through the 2.4G channel (40M bandwidth) based on the softAp communication connection. The bandwidth of the 2.4 channel can be other values besides 40M, such as 20M, and this embodiment of the present application is not limited to this.
[0046] It should be understood here that the bandwidth of a channel refers to the frequency range used to transmit data (such as files) in wireless communication. Bandwidth can also be called bandwidth. Bandwidth is usually expressed in Hertz (hz). In wireless communication, the bandwidth of a channel defines the maximum data transmission rate that the channel can accommodate. A wider bandwidth usually means a higher data transmission rate. For example, the data transmission rate of a 5G channel with a bandwidth of 160M is usually greater than the data transmission rate of a 5G channel with a bandwidth of 80M.
[0047] Figure 1A as well as Figure 1B A set of exemplary user interfaces involved in transferring files through the electronic device 100 is shown.
[0048] Combine the following Figure 1A as well as Figure 1B The schematic process of transmitting files by the electronic device 100 is described.
[0049] like Figure 1A As shown in (1), the user interface 22 is an exemplary user interface involved in selecting a file to be transferred by the electronic device 100. The file to be transferred can be selected through the user interface 22. In response to an operation (e.g., a click operation) on the "Send" control 221, the electronic device 100 can display an interface for selecting a sending method for the user to select a method involved in file transfer.
[0050] For example, refer to the following Figure 1AAs shown in (2), user interface 23 is an exemplary user interface for selecting a sending method. In response to an operation (e.g., a click operation) on the "Share" control 231, the electronic device 100 may start 5GP2P or start 2.4GsoftAP, or both. Subsequently, the electronic device 100 searches for a list of devices that can communicate, and displays the following information: Figure 1A The user interface 24 shown in (3) is used to display the device list.
[0051] refer to Figure 1A In the user interface 24 shown in (3), in response to the operation of selecting the device icon 241 (e.g., a click operation), the electronic device 100 can use the electronic device associated with the device icon 241 as the electronic device 200, and establish a P2P communication connection with the electronic device 200 based on the 5G channel (160M bandwidth or 80M bandwidth). Subsequently, the file is transferred to the electronic device 200 based on the P2P communication connection. Alternatively, in response to the operation of selecting the device icon 241 (e.g., a click operation), the electronic device 100 establishes a P2P communication connection with the electronic device 200 based on the 5G channel (160M bandwidth or 80M bandwidth), and establishes a softAP communication connection based on the 2.4G channel. Subsequently, the file is transferred to the electronic device 200 based on the P2P communication connection and the softAP communication connection.
[0052] It should be understood that the determination method of the bandwidth of the 5G channel and whether the electronic device 100 is single-channel transmission or dual-channel transmission can refer to the description of the aforementioned related content, which will not be repeated here.
[0053] Among them, single-channel transmission means that the electronic device 100 uses only the 5G channel for file transmission or only the 2.4G channel for file transmission. Dual-channel transmission means that the electronic device 100 uses both the 5G channel and the 2.4G channel for file transmission.
[0054] In some possible cases, in response to an operation (e.g., a click operation) on the selected device icon 241, the electronic device 100 may not start to transfer files after completing the establishment of a communication connection with the electronic device 200. Before starting to transfer files, the electronic device 100 may also display a prompt message, which is used to prompt the user to choose whether to turn off the WLAN service. The prompt message may also display the time required for file transfer. After the electronic device 100 determines whether to turn off the WLAN service, the electronic device 100 starts to transfer files to the electronic device 200. For example, refer to Figure 1B The user interface 25a and the user interface 26a shown in (1) are schematic user interfaces for transmitting files when the electronic device 100 does not turn off the WLAN service. Figure 1BThe user interface 25b and the user interface 26b shown in (2) are schematic user interfaces for transferring files when the WLAN service is turned off by the electronic device 100. In response to the operation on the "confirm" control 251, the electronic device 100 can transfer the file to the electronic device 200.
[0055] It should be understood that displaying the prompt information to determine whether to turn off the WLAN service is optional. In some possible cases, the electronic device 100 may turn off the WLAN service by default when performing file transfer, without displaying the prompt information.
[0056] It should be understood here that the aforementioned Figure 1A as well as Figure 1B The user interface for transferring files involved in the embodiment is a set of exemplary user interfaces. In actual situations, the user interface involved in file transfer may include more or fewer control operations and display more or less information. This should not constitute a limitation on the embodiments of the present application.
[0057] refer to Figure 2 , which is a schematic diagram of file transmission between electronic device 100 and electronic device 200.
[0058] Figure 2 The dual-channel transmission is used as an example for explanation. When transmitting a file, the electronic device 100 divides the file into sub-file 1 and sub-file 2. The electronic device 100 can transmit sub-file 1 to the electronic device 200 through a 5G channel with a bandwidth of 160M based on a 5GP2P communication connection, and the electronic device 100 can transmit sub-file 2 to the electronic device 200 through a 2.4G channel with a bandwidth of 40M based on a 2.4GsoftAP communication connection.
[0059] The following introduces exemplary system structures of the electronic device 100 in some embodiments.
[0060] It should be understood that the software structure of the electronic device 200 is similar to or the same as that of the electronic device 100. The software structure of the electronic device 100 is described here as an example. The software structure of the electronic device 200 can refer to the relevant description and will not be repeated here.
[0061] refer to Figure 3 As shown, the layered architecture divides the system into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into five layers, from top to bottom, namely, application layer, application framework layer, hardware abstraction layer (HAL), kernel layer, and hardware layer.
[0062] Wherein, in some possible cases, the hardware abstraction layer can also be replaced by the native layer. The kernel layer can also be called the driver layer.
[0063] The application layer can include a series of application packages.
[0064] like Figure 4 As shown, the application package may include a sharing application. The sharing application may include a "nearby" function. The "nearby" function may provide an interface for sharing data (such as files). The "nearby" function may call the WiFi extension manager to implement the call of each interface of the application framework layer.
[0065] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0066] The application framework layer may include a wifi extension manager, a connection manager, a P2P module, and a softAP module.
[0067] Among them, the wifi extension manager can implement the call between each interface of the application layer and each interface of the application framework layer.
[0068] The connection manager includes a WLAN management module and a DFS channel management module.
[0069] The DFS channel management module is used to determine whether the file to be transmitted is larger than a preset threshold and whether the electronic device 100 supports DBDC. It is also used to determine whether the DFS channel is available. The DFS channel management module is also used to call the P2P module to start P2P communication, and the softAP module to start softAP communication.
[0070] The WLAN management module is used to manage the closing and opening of WLAN services.
[0071] The P2P module includes a P2P management module, a SupplicantP2PlfaceCallback module, and a SupplicantP2PlfaceHalEx module.
[0072] The P2P module is responsible for starting P2P communication and controlling the electronic device 100 to establish a P2P communication connection with the electronic device 200. The P2P management module is used to call the SupplicantP2PlfaceHalEx module to issue an instruction to establish a P2P communication connection. The P2P management module is used to call the SupplicantP2PlfaceHalEx module to issue an instruction to establish a connection with the electronic device 200 based on P2P communication. The P2P management module is also used to receive the result of starting P2P communication through the SupplicantP2PlfaceCallback module, and receive the result of establishing a connection with the electronic device 200 based on P2P communication through the SupplicantP2PlfaceCallback module.
[0073] The softAP module includes a softAP management module and a HostapdHal module.
[0074] The softAP module is responsible for starting softAP communication and controlling the electronic device 100 to establish a softAP communication connection with the electronic device 200. The softAP management module is used to call the HostapdHal module to issue an instruction to establish a softAP communication connection, and receive the result of starting softAP communication sent by the HostapdHal module. The softAP management module is also used to call the HostapdHal module to issue an instruction to establish a connection with the electronic device 200 based on softAP communication, and receive the result of establishing a connection with the electronic device 200 based on softAP communication sent by the HostapdHal module.
[0075] The HAL layer is an interface layer located between the application framework layer and the kernel layer of the system. Its purpose is to abstract the hardware and provide a virtual hardware platform for the system.
[0076] The hardware abstraction layer may include a wpa_supplicant module and a Hostapd module.
[0077] The wpa_supplicant module is used to call the Wifi driver to trigger the Wifi hardware to start P2P communication after receiving the instruction to start P2P communication issued by the SupplicantP2PlfaceHalEx module.
[0078] The Hostapd module is used to call the Wifi driver to trigger the Wifi hardware to start softAP communication after receiving the instruction to start softAP communication issued by the HostapdHal module.
[0079] The kernel layer is the layer between hardware and software. The kernel layer can include Wifi drivers.
[0080] The Wifi driver is used to trigger (drive) the Wifi hardware to start communication (including P2P communication and softAP communication).
[0081] The hardware layer may include Wifi hardware.
[0082] The Wifi hardware is used to be triggered by the Wifi driver to start communication (including P2P communication and softAP communication). It is also used to notify the upper layer module to respond to the communication request through the Wifi driver to establish a communication connection between the electronic device 100 and the electronic device 200 after receiving the communication request sent by the electronic device 200 to the electronic device 100.
[0083] In combination with the software structure involved above, the interaction process between the internal modules when the electronic device 100 transfers a file to the electronic device 200 is described in detail below.
[0084] Here, the electronic device 100 sends a file to the electronic device 200 through dual-path transmission including 5G P2P and 2.4G softAP as an example. At this time, the interaction process involved in the electronic device 100 transmitting a file to the electronic device 200 can refer to the following description of steps S201 to S216.
[0085] S201. The sharing application responds to the operation of sharing the file through the nearby function.
[0086] The operation of sharing files through the nearby function includes the aforementioned Figure 1A The operation of the "Share" control 231 shown in (2) in the figure. In response to the operation of sharing files through the nearby function, the sharing application can trigger the operation of dual-path transmission of files through 5GP2P and 2.4GsoftAP. For a detailed description of the process, please refer to the following description of steps S201 to S216.
[0087] S202. The DFS channel management module determines that the file is larger than a preset threshold.
[0088] The preset threshold may be set to 1 GB, or may be a value greater or smaller than 1 GB, such as 2 GB, etc., which is not limited in the embodiment of the present application.
[0089] S203. The DFS channel management module in the connection management module determines that the electronic device 100 supports dual-band dual-channel.
[0090] The DFS channel management module determines that the electronic device 100 supports dual-band dual-channel in a manner including but not limited to: the DFS channel management module can search whether the electronic device 100 lists the dual-band dual-channel function in the wireless communication function information of the electronic device 100. If the dual-band dual-channel function is listed, it is determined that the electronic device 100 supports dual-band dual-channel.
[0091] S204. The DFS channel management module determines that the electronic device 100 supports the use of the DFS channel.
[0092] It should be understood here that, in some possible cases, the DFS channel management module determines that the electronic device 100 supports the use of the DFS channel in ways that include but are not limited to: determining that the chip capability of the electronic device 100 supports the use of a channel with a bandwidth of up to 160M, and determining that the country code in the electronic device 100 is CN.
[0093] Determining that the electronic device 100 supports the use of the DFS channel indicates that the electronic device 100 has the ability to use the DFS channel. Then, the DFS channel management module can further determine to use the DFS channel when transmitting files using a non-CAC detection method. The process of determining to use the DSF channel when transmitting files can refer to the following description of steps S205 to S209.
[0094] S205. The DFS channel management module obtains the DFS list.
[0095] The DFS list includes at least one routing device and the center frequency corresponding to each routing device. The center frequency corresponding to a routing device represents the average of the lowest frequency and the highest frequency on the channel used by the routing device.
[0096] Generally speaking, the DFS list obtained in step S205 is obtained by the DFS channel management module through active detection. Active detection means that after the DFS channel management module determines that the electronic device 100 supports the use of DFS channels, it turns on the WLAN scanning function to obtain the DFS list.
[0097] S206. The DFS channel management module determines through the DFS list that there are electronic devices other than the electronic device 100 using the DFS channel in the surrounding area.
[0098] The DFS channel includes a total of 8 channels. When a device uses the DFS channel, it can use one or more of the 8 channels. The 8 channels are channel 36, channel 40, channel 44, channel 48, channel 52, channel 56, channel 60 and channel 64. The bandwidth of each of the 8 channels is 20Mhz. The first 4 channels of the 8 channels (channel 36, channel 40, channel 44 and channel 48) not only belong to the DFS channel but also belong to the aforementioned 80M 5G channel. Therefore, the center frequencies of the last 4 channels (channel 52, channel 56, channel 60 and channel 64) of the 8 channels can be used to distinguish whether there are routing devices using DFS channels in the DFS list. Among them, the center frequencies of the last 4 channels are 5260, 5280, 5300 and 5320 respectively.
[0099] The DFS channel management module can determine whether there is a routing device in the DFS list whose center frequency is equal to at least one of 5260, 5280, 5300 and 5320. If there is a routing device whose center frequency is equal to at least one of 5260, 5280, 5300 and 5320, the DFS channel management module determines through the DFS list that there are electronic devices (routing devices) other than the electronic device 100 in the surrounding area using the DFS channel.
[0100] S207. The DFS channel management module determines that the electronic device 100 is indoors.
[0101] The DFS channel management module determines whether the electronic device is indoors by the number of satellites connected to the electronic device 100. The satellites include global navigation satellite system (GNSS) satellites.
[0102] In some possible cases, when the DFS channel management module determines that the number of satellites to which the electronic device 100 is connected is less than or equal to 10, it is determined that the electronic device 100 is indoors.
[0103] In some possible cases, when the DFS channel management module determines that the difference between the number of satellites discovered by the electronic device 100 and the number of connected satellites is greater than or equal to 5, it is determined that the electronic device 100 is indoors.
[0104] In some other possible cases, when the DFS channel management module determines that the number of satellites discovered by the electronic device 100 is greater than or equal to 35, but the number of connected satellites is less than or equal to 30, it is determined that the electronic device 100 is indoors.
[0105] S208. The WLAN management module in the connection management module shuts down the WLAN service.
[0106] The WLAN services that are shut down here are those other than file transfer that require the use of 5G channels or 2.4G channels.
[0107] In some possible implementations, when the DFS channel management module determines that there is a routing device using the DFS channel and that the electronic device 100 is indoors, the DFS channel management module may notify the connection management module to shut down the WLAN service.
[0108] In some other possible implementations, when the DFS channel management module determines that there is a routing device using the DFS channel and that the electronic device 100 is indoors, the DFS channel management module may notify the sharing application to display a prompt message, which is used to prompt whether to close the WLAN service when transferring files. When the operation of closing the WLAN service is detected, in response to the operation of closing the WLAN service, the sharing application closes the WLAN service through the connection management module. For the description of the prompt message, please refer to the above description of Figure 1B The description of the relevant contents will not be repeated here.
[0109] S209. The DFS channel management module turns off CAC detection.
[0110] When the DFS channel management module determines that there is a routing device using the DFS channel and determines that the electronic device 100 is indoors, the CAC detection may be turned off.
[0111] S210a. The P2P start module starts 5G P2P with 160M bandwidth.
[0112] The P2P startup module creates a P2P group and determines that the electronic device 100 is the group owner (GO) in the P2P group. Then, the following step S211a is performed to add devices other than the electronic device 100 to the P2P group. The devices in the P2P group can communicate based on 5G P2P with a bandwidth of 160M.
[0113] It should be understood here that the P2P startup module is Figure 3 Not directly shown, it may include the aforementioned Figure 3 Related modules involved in starting P2P communication.
[0114] S211a. The P2P connection module establishes a connection between the electronic device 100 and the electronic device 200 through 5G P2P.
[0115] The P2P connection module initiates a device scan to obtain a list of devices that can communicate based on 5G P2P. Select a device (such as electronic device 200) from the device list to initiate a connection request. After receiving a response confirming the connection sent by electronic device 200, the electronic device 100 establishes a 5G P2P communication connection with the electronic device 200. At this time, the electronic device 200 joins the P2P group (group client, GC) as a group client.
[0116] It should be understood here that the P2P connection module is Figure 3 Not directly shown, it may include the aforementioned Figure 3 The related modules involved in the process of establishing a connection between the electronic device 100 and the electronic device 200 via 5G P2P.
[0117] S210b.softAP startup module starts 2.4G softAP with 40M bandwidth.
[0118] The softAP startup module sets the electronic device 100 as a network access point (AP). Then, the following step S211b is executed to connect devices other than the electronic device 100 to the AP, so that the devices connected to the AP (such as the electronic device 200) can communicate with the electronic device 100 based on the 2.4G softAP with a bandwidth of 40M.
[0119] It should be understood here that the softAP startup module is Figure 3 Not directly shown, it may include the aforementioned Figure 3 Related modules involved in starting softAP communication.
[0120] S211b. softAP connection module The electronic device 100 establishes a connection with the electronic device 200 via the 2.4G softAP.
[0121] After the softAP connection module receives the connection request sent by the electronic device 200, the electronic device 100 chooses to establish a 2.4G softAP communication connection with the electronic device 200, which means that the electronic device 100 establishes a connection with the electronic device 200 through the 2.4G softAP. The process of the connection request sent by the electronic device 200 includes: the electronic device 200 initiates a device scan, and after scanning an accessible AP (created by the electronic device 100), a connection request to access the AP can be sent to the electronic device 100.
[0122] It should be understood here that the softAP connection module is Figure 3 Not directly shown, it may include the aforementioned Figure 3The related modules involved in the electronic device 100 are used to establish a connection with the electronic device 200 through the 2.4G softAP.
[0123] The exemplary user interface involved in establishing a communication connection (including 5G GP2P communication and 2.4G softAP) between the electronic device 100 and the electronic device 200 can refer to the aforementioned Figure 1A The user interface 24 shown in (3) .
[0124] S212. The DFS channel management module divides the file into sub-file 11 and sub-file 21.
[0125] The DFS channel management module file is divided into N1 data packets, sub-file 11 includes N11 data packets, and sub-file 21 includes other data packets (recorded as N12 data packets) among the N data packets except N11 data packets.
[0126] In some possible cases, the sizes of subfile 11 and subfile 21 are determined before the file transfer begins. At this time, the size ratio of subfile 11 to subfile 21 is determined based on the data transmission rate on the 5G channel (DFS channel) with a bandwidth of 160M and the data transmission rate on the 2.4G channel with a bandwidth of 40M. For example, the size ratio of subfile 11 to subfile 21 is equal to the ratio of the data transmission rate on the 5G channel with a bandwidth of 160M to the data transmission rate on the 2.4G channel with a bandwidth of 40M, rounded off. Subsequently, execute the following step S213a to send subfile 1 to the electronic device 200 via the P2P link based on the DFS channel, and execute the following step S213b to send subfile 2 to the electronic device 200 via the softAP link based on the 2.4G channel.
[0127] For example, the data transmission rate (maximum physical rate) on a 5G channel with a bandwidth of 160M is generally 2402Mbps. The data transmission rate on a 2.4G channel with a bandwidth of 40M. The ratio of the data transmission rate on a 5G channel with a bandwidth of 160M to the data transmission rate on a 2.4G channel with a bandwidth of 40M can be rounded to 4. Then the electronic device 100 can use 20% of the file as sub-file 11 and 80% of the file other than 20% as sub-file 21.
[0128] In this way, the 5G channel and the 2.4G channel can be balanced for file transfer, and both channels (including the 5G channel and the 2.4G channel) can be in the transmission state to the maximum extent, making full use of the channels.
[0129] S213a. The P2P connection module sends the subfile 11 to the electronic device 200 via the P2P link based on the DFS channel.
[0130] S213b. The softAP connection module sends the subfile 21 to the electronic device 200 via the softAP link based on the 2.4G channel.
[0131] For the aforementioned steps S212, S213a and S213b, in some other possible cases, the size of subfile 11 and subfile 21 is not determined before the file is transmitted, but is dynamically adjusted during the transmission process based on the information of the 5GP2P link and the 2.4GsoftAP link (such as transmission rate, signal-to-noise ratio, etc.). Then the aforementioned steps S212, S213a and S213b may not be performed. Instead, the following steps are performed: the DFS channel management module can start at least one stream on the 5GP2P link for transmitting data packets, and can start at least one stream on the 2.4GP2P link for transmitting data packets. The DFS channel management module can divide the file into N1 data packets, send the data packets one by one through at least one socket to the 5GP2P link for transmission according to frequency 1, and send the data packets one by one through at least one socket to the 2.4GsoftAP link for transmission according to frequency 2. The ratio of frequency 1 to frequency 2 is determined based on the data transmission rate on the 5G channel (DFS channel) with a bandwidth of 160M and the data transmission rate on the 2.4G channel with a bandwidth of 40M. For example, the ratio of frequency 1 to frequency 2 is equal to the ratio of the data transmission rate on the 5G channel with a bandwidth of 160M to the data transmission rate on the 2.4G channel with a bandwidth of 40M, rounded to the integer. When the transmission rate of the 5GP2P link slows down, frequency 1 can be adjusted down, and when the transmission rate of the 5GP2P link speeds up, frequency 1 can be adjusted up. When the transmission rate of the 2.4GsoftAP link slows down, frequency 2 can be adjusted down, and when the transmission rate of the 2.4GsoftAP link speeds up, frequency 2 can be adjusted up. Among them, the socket is created based on the nearby function in the sharing application.
[0132] S214. The DFS channel management module starts CAC detection.
[0133] The execution timing of step S214 includes but is not limited to the following timings.
[0134] Startup timing 1: After the electronic device 100 establishes a connection with the electronic device 200 through 5G P2P based on the DFS channel, the DFS channel management module can start CAC detection.
[0135] Turn-on timing 2: the electronic device 100 performs CAC detection at a preset frequency. Turning off CAC detection in the aforementioned step S209 means skipping a CAC detection for 1 minute. After 1 minute, the electronic device 100 continues to perform CAC detection at a preset frequency.
[0136] S215a. The P2P connection module notifies the DFS channel management module that the sharing is finished.
[0137] S215b. The softAP connection module notifies the DFS channel management module that the sharing is finished.
[0138] S216. The DFS channel management module starts the WLAN service.
[0139] After receiving the sharing end notification sent by the softAP connection module and receiving the sharing end notification sent by the P2P connection module, the DFS channel management module determines that the file transfer is completed and the WLAN service can be started.
[0140] It should be understood that, among the aforementioned steps S201 to S216, there is no order of execution between step S203 and step S204. There is no order of execution between step S206 and step S207. There is no order of execution between step S208 and step S210a and step S210b.
[0141] It should be understood here that the aforementioned Figure 3 as well as Figure 4 The example in which the electronic device 100 sends a file to the electronic device 200 through two-way transmission including 5GP2P and 2.4GsoftAP is used for explanation. In actual situations, the electronic device 100 can also determine whether to perform two-way transmission. If it is a single-way transmission, the electronic device 100 can only perform file transmission through 5GP2P. For the process of electronic devices using different communication connections for file transmission in different situations, please refer to the following Figure 5 Related content in .
[0142] Figure 5 An exemplary flow chart involved in transferring a file from the electronic device 100 to the electronic device 200 is shown.
[0143] The process involved in the file transmission from the electronic device 100 to the electronic device 200 may refer to the following description of steps S11 to S22.
[0144] S11. The electronic device 100 responds to the operation of sharing the file.
[0145] The operation of sharing a file may be the aforementioned operation of responding to the sharing of a file through the nearby function, and reference may be made to the description of the relevant contents in the aforementioned step S201, which will not be repeated here.
[0146] S12: Whether the file size is greater than a preset threshold.
[0147] If the file size is larger than or equal to the preset threshold, the file data volume is relatively large, and the electronic device 100 may execute the following step S13 to determine whether the file can be transmitted to the electronic device 200 via two-way transmission.
[0148] If the file size is smaller than the preset threshold, the file data volume is small, and the electronic device 100 can execute the following step S18 to transmit the file to the electronic device 200 via single-channel transmission.
[0149] S13. Whether the electronic device 100 supports dual-band dual-channel.
[0150] When the electronic device 100 supports dual-band dual-channel, the electronic device 100 may execute the following step S14 to turn off the WLAN service and then transmit the file to the electronic device 200 through dual-path transmission.
[0151] When the electronic device 100 does not support dual-band dual-channel, the electronic device 100 can transmit the file to the electronic device 200 through single-channel transmission. For the relevant contents involved in this process, reference can be made to the following description of steps S18 to S22.
[0152] S14. The electronic device 100 turns off the WLAN service.
[0153] This step S14 is optional.
[0154] The WLAN services that are turned off here are services other than file transmission that require the use of 5G channels or 2.4G channels. In order to prevent the WLAN service from interfering with file transmission during data transmission, the electronic device 100 turns off the WLAN service.
[0155] In some possible cases, the electronic device 100 may turn off the WLAN service at a time when responding to a file sharing operation, or at other times.
[0156] S15. Is the DFS channel available?
[0157] In step S15, whether the DFS channel is available is determined by non-CAC detection.
[0158] For details on whether an electronic device determines whether a DFS channel is available, please refer to the following Figure 6 Description of steps S31-S34 in .
[0159] S31 . Determine whether the chip of the electronic device 100 supports the use of the DFS channel.
[0160] If it is determined that the chip capability of the electronic device 100 supports a channel bandwidth of up to 160M, then it is determined that the chip supports the use of the DFS channel. At this time, the electronic device 100 may perform the following step S32 to further determine whether the electronic device 100 can use the DFS channel.
[0161] If it is determined that the bandwidth of the channel supported by the chip capability of the electronic device 100 does not reach 160M, it is determined that the chip does not support the use of the DFS channel. At this time, the electronic device 100 may perform the following S35 to determine that the DFS channel is unavailable.
[0162] S32 . Determine whether there are any electronic devices other than the electronic device 100 using the DFS channel in the surrounding area.
[0163] The electronic device 100 may determine whether there is a routing device in the DFS list whose center frequency is equal to at least one of 5260, 5280, 5300, and 5320.
[0164] If there is a routing device whose center frequency is equal to at least one of 5260, 5280, 5300 and 5320, it is determined that there is an electronic device (routing device) other than the electronic device 100 using the DFS channel. At this time, the electronic device 100 can perform the following step S33 to further determine whether the electronic device 100 can use the DFS channel.
[0165] If there is no routing device whose center frequency is equal to at least one of 5260, 5280, 5300, and 5320, it is determined that there is no electronic device (routing device) other than the electronic device 100 using the DFS channel around the electronic device 100. At this time, the electronic device 100 may determine that the DFS channel is unavailable.
[0166] For details about the DFS list and determining whether there are electronic devices other than the electronic device 100 using the DFS channel around the electronic device 100 based on the DFS list, please refer to the aforementioned description of step S205 and step S206, which will not be repeated here.
[0167] S33. Determine whether the electronic device 100 is indoors.
[0168] The electronic device 100 can determine whether the electronic device is indoors by the number of satellites connected to the electronic device 100. The satellites include global navigation satellite system (GNSS) satellites. For a detailed description of the process, reference can be made to the aforementioned description of step S207, which will not be repeated here.
[0169] When the electronic device 100 is indoors, the electronic device 100 executes the following step S34 to determine whether the DFS channel is available.
[0170] When the electronic device 100 is not indoors, the electronic device 100 performs the following step S35 to determine whether the DFS channel is available.
[0171] S34. Determine whether the DFS channel is available.
[0172] S35. Determine that the DFS channel is unavailable.
[0173] It should be noted that when the DFS channel is available, the electronic device 100 can perform the following steps S16a and S17a to use 5G P2P with 160M bandwidth and 2.4G softAP with 40M bandwidth for file transfer. When 5G P2P with 160M bandwidth is used for file transfer, the channel used is the DFS channel.
[0174] When the DFS channel is unavailable, the electronic device 100 may perform the following steps S16b and S17b to perform file transfer using 5G P2P with 80M bandwidth and 2.4G softAP with 40M bandwidth.
[0175] It should be understood here that there is no particular order in which step S14, step S15, step S12, and step S13 are executed.
[0176] When performing step S15 first and then performing step S14, the electronic device 100 may close the WLAN service when the DFS channel is available. One situation in which the DFS channel is available includes: the electronic device 100 determines that there is a routing device using the DFS channel and determines that the electronic device 100 is indoors.
[0177] Alternatively, when step S15 is performed first and then step S14 is performed, when the DFS channel of the electronic device 100 is available, the electronic device 100 may display a prompt message to prompt whether to close the WLAN service when transferring files. In response to the operation of closing the WLAN service, the electronic device 100 closes the WLAN service. For the description of the prompt message, please refer to the above Figure 1B The description of the relevant contents will not be repeated here.
[0178] S16a. The electronic device 100 starts the 5G P2P with a bandwidth of 160M and starts the 2.4G softAP with a bandwidth of 40M.
[0179] When it is determined that the DFS channel is available, the electronic device 100 starts the 5G P2P with a bandwidth of 160M and starts the 2.4G softAP with a bandwidth of 40M, and uses two-way transmission to send the file to the electronic device 200. The channel used by the electronic device 100 to transmit the file to the electronic device 200 using the 5G P2P with a bandwidth of 160M is the DFS channel.
[0180] For the relevant content of the electronic device starting the 5G P2P with 160M bandwidth, reference may be made to the relevant description of step S210a. For the relevant content of the electronic device starting the 2.4G softAP with 40M bandwidth, reference may be made to the relevant description of step S210b. No further details will be given here.
[0181] It should be understood that the 40M involved in step S16a and the following step S16b is for illustration only, and the actual bandwidth may be other bandwidths, such as 20M, which is not limited in the embodiment of the present application.
[0182] After the electronic device 100 starts the 5G P2P with a bandwidth of 160M, a 5GP2P communication connection can be established with the electronic device 200 through 5G P2P. For a detailed description of the process, please refer to the aforementioned description of step S211a, which will not be repeated here. Moreover, after the electronic device 100 starts the 2.4G softAP with a bandwidth of 40M, a 5G P2P communication connection can be established with the electronic device 200 through the 2.4G softAP. For a detailed description of the process, please refer to the aforementioned description of step S211a, which will not be repeated here. Subsequently, the electronic device 100 can execute the following step S17a to send the file to the electronic device 200 using two-way transmission.
[0183] S17a. The electronic device 100 divides the file into sub-file 11 and sub-file 21, sends sub-file 11 to the electronic device 200 via 5G P2P based on the DFS channel, and sends sub-file 21 to the electronic device 200 via 2.4softAP based on the 2.4G channel, where the DFS channel is a 5G channel with a bandwidth equal to 160M.
[0184] For the division method of sub-file 11 and sub-file 21, reference may be made to the description of the relevant contents in the aforementioned step S212, which will not be repeated here.
[0185] It should be understood that step S17a is optional, and the actual transmission process may also be other transmission modes. Please refer to the above description of the relevant contents when step S212, step S213a and step S213b are not performed, and will not be repeated here.
[0186] S16b. The electronic device 100 starts the 5G P2P with 80M bandwidth and starts the 2.4G softAP with 40M bandwidth.
[0187] This step S16b is similar to the content in the aforementioned step S16a, and the relevant content of the DFS channel is deleted, and the 160M bandwidth is changed to 80M bandwidth. Here, the channel used by the electronic device 100 to transfer files to the electronic device 200 using 5G P2P with 80M bandwidth is no longer a DFS channel. Instead, it is a 5G channel with a slower transmission rate than the DFS channel.
[0188] S17b. The electronic device 100 divides the file into sub-file 12 and sub-file 22, sends sub-file 12 to the electronic device 200 via 5G P2P based on a 5G channel with an 80M bandwidth, and sends sub-file 22 to the electronic device 200 via a 2.4G softAP based on a 2.4G channel.
[0189] This step S17b is similar to the aforementioned step S17a, and only requires deleting the relevant content of the DFS channel and changing the 160M bandwidth to 80M bandwidth, which will not be described in detail here.
[0190] It should be understood here that sending subfile 1 (subfile 11 with 160M bandwidth or subfile 12 with 80M bandwidth) to electronic device 200 through 5G P2P based on 5G channel with 160M or 80M bandwidth can also be understood as: sending subfile 1 to electronic device 200 through P2P communication connection based on 5G channel with 160M or 80M bandwidth, in which case the P2P communication connection is a 5GP2P communication connection. Sending subfile 2 (subfile 21 or subfile 22) to electronic device 200 through 2.4G channel can also be understood as: sending subfile 2 to electronic device 200 through softAP communication connection based on 2.4G channel with 40M bandwidth, in which case the softAP communication connection is a 2.4GsoftAP communication connection.
[0191] S18. Is the DFS channel available?
[0192] This step S18 is the same as the aforementioned step S15, and reference may be made to the aforementioned description of step S15, which will not be repeated here.
[0193] The step S18 is optional, and the electronic device 100 may not perform the step S18, but directly perform the following steps S21 and S22. In the case that the step S18 is not performed, the following steps S19 and S20 are also not performed.
[0194] S19. The electronic device 100 starts 5G P2P with a bandwidth of 160M.
[0195] When dual-band dual-channel is not supported but the DFS channel is available, the electronic device 100 starts 5G P2P with a bandwidth of 160M and uses a single-channel transmission to send the file to the electronic device 200. The channel used by the electronic device 100 to transfer files to the electronic device 200 using 5G P2P with a bandwidth of 160M is the DFS channel.
[0196] Among them, for the relevant content of the electronic device 100 starting 5G P2P with 160M bandwidth, please refer to the aforementioned description of step S210a, which will not be repeated here.
[0197] After the electronic device 100 starts the 5G P2P with 160M bandwidth, a 5GP2P communication connection can be established with the electronic device 200 through 5G P2P. For a detailed description of the process, reference can be made to the aforementioned description of step S211a, which will not be repeated here. Subsequently, the electronic device 100 can execute the following step S20 to send the file to the electronic device 200 using a single-channel transmission.
[0198] S20. The electronic device 100 sends the file to the electronic device 200 via 5G P2P based on a 160M 5G channel.
[0199] S21. The electronic device 100 starts 5G P2P with 80M bandwidth.
[0200] This step S21 is similar to the content in the aforementioned step S19, and the relevant content of the DFS channel is deleted, and the 160M bandwidth is changed to 80M bandwidth. Here, the channel used by the electronic device 100 to transfer files to the electronic device 200 using 5G P2P with 80M bandwidth is no longer a DFS channel. Instead, it is a 5G channel with a slower transmission rate than the DFS channel.
[0201] S22. The electronic device 100 sends the file to the electronic device 200 via the 5G channel based on the 80M channel of the 5G P2P.
[0202] It should be understood here that the aforementioned 5GP2P communication connection and 2.4GsoftAP communication connection are examples and should not constitute a display of the embodiments of the present application. In the case of single-channel transmission, the aforementioned content is described by using 5GP2P as an example, but it can actually be 5GsoftAP. Or in the case of single-channel transmission, the 5G channel can be used instead of the 2.4 channel for transmission. When using the 2.4 channel to transfer files to the electronic device 200, the type of communication connection connected to the electronic device 200 can be 2.4GP2P or 2.4GsoftAP, etc., which is not limited in the embodiments of the present application. In the case of dual-channel transmission, as long as one channel uses the 5G channel and the other uses the 2.4G channel. In the case of dual-channel transmission, the communication connection type corresponding to the 5G channel can be 2.4GP2P or 2.4GsoftAP, etc., and the communication connection type corresponding to the 2.4G channel can be 2.4GP2P or 2.4GsoftAP, etc.
[0203] For two-way transmission, refer to Figure 7 , Figure 7 It shows several types of communication involved when the electronic device 100 transmits a file to the electronic device 200 when the DFS channel is available. For the case where the DFS is not available, please refer to the relevant content, which will not be described here.
[0204] like Figure 7 As shown in (1), when dual-path transmission and the DFS channel is available, when transmitting a file, the electronic device 100 divides the file into sub-file 1 and sub-file 2. The electronic device 100 can transmit sub-file 1 to the electronic device 200 through the 5G channel with a bandwidth of 160M based on the 5GP2P communication connection, and the electronic device 100 can transmit sub-file 2 to the electronic device 200 through the 2.4G channel with a bandwidth of 40M based on the 2.4GsoftAP communication connection.
[0205] like Figure 7 As shown in (2), when dual-path transmission and the DFS channel is available, when transmitting a file, the electronic device 100 divides the file into sub-file 1 and sub-file 2. The electronic device 100 can transmit sub-file 1 to the electronic device 200 through the 5G channel with a bandwidth of 160M based on the 5G softAP communication connection, and the electronic device 100 can transmit sub-file 2 to the electronic device 200 through the 2.4G channel with a bandwidth of 40M based on the 2.4GP2P communication connection.
[0206] like Figure 7As shown in (3), when dual-path transmission and the DFS channel is available, when transmitting a file, the electronic device 100 divides the file into sub-file 1 and sub-file 2. The electronic device 100 can transmit sub-file 1 to the electronic device 200 through a 5G channel with a bandwidth of 160M based on a 5GP2P (denoted as P2P0) communication connection, and the electronic device 100 can transmit sub-file 2 to the electronic device 200 through a 2.4G channel with a bandwidth of 40M based on a 2.4GP2P (denoted as P2P1) communication connection.
[0207] like Figure 7 As shown in (4), when dual-path transmission and the DFS channel is available, when transmitting a file, the electronic device 100 divides the file into sub-file 1 and sub-file 2. The electronic device 100 can transmit sub-file 1 to the electronic device 200 through the 5G channel with a bandwidth of 160M based on the 5G softAP (denoted as softAP 0) communication connection, and the electronic device 100 can transmit sub-file 2 to the electronic device 200 through the 2.4G channel with a bandwidth of 40M based on the 2.4G softAP (denoted as softAP 1) communication connection.
[0208] An exemplary electronic device 100 provided in an embodiment of the present application is introduced below.
[0209] Figure 8 It is a schematic diagram of the structure of the electronic device 100 provided in an embodiment of the present application.
[0210] It should be understood here that the structures of the electronic device 100 and the electronic device 200 are similar or identical. The structure of the electronic device 100 is described here, and the description of the electronic device 200 can refer to related content, which will not be repeated here.
[0211] The following is a detailed description of the embodiment using the electronic device 100 as an example. It should be understood that the electronic device 100 may have more than Figure 8 More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 8 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0212] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194 and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0213] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 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.
[0214] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0215] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks) applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 also provides a basis for the electronic device 100 to support dual-band dual-channel.
[0216] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0217] In the embodiment of the present application, the processor 110 can call the computer instructions stored in the internal memory 121 to enable the terminal to execute the file transmission method in the embodiment of the present application.
[0218] The electronic device 100 may also include a chip system, which may include one or more processors, and the processor may be used to call computer instructions to enable the electronic device to execute the file transfer method in the embodiment of the present application.
[0219] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0220] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0221] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0222] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Claims
1. A file transmission method, characterized in that: The method comprises: In response to the file sharing operation, the first electronic device determines that there is a routing device using a dynamic frequency selection DFS channel, and when determining that the first electronic device is indoors, closes the channel availability detection CAC and establishes a first communication connection with the second electronic device based on the DFS channel, and the DFS channel is a 5G channel with a first bandwidth; wherein the routing device is used to determine whether the DFS channel is available after performing the CAC detection according to the first frequency; The first electronic device sends the file to the second electronic device through the 5G channel of the first bandwidth based on the first communication connection.
2. The method according to claim 1, characterized in that When the first electronic device determines that there is a routing device using a dynamic frequency selection DFS channel and determines that the first electronic device is indoors, the method further includes: The first electronic device turns off the wireless local area network WLAN service.
3. The method according to claim 1 or 2, characterized in that: The first electronic device sends the file to the second electronic device through the 5G channel of the first bandwidth based on the first communication connection, specifically including: Sending the first part of the file to the second electronic device through the 5G channel of the first bandwidth based on the first communication connection; After the WLAN service is turned off, when a first communication connection is established with a second electronic device based on the DFS channel, the method further includes: The first electronic device also establishes a second communication connection with the second electronic device based on a 2.4G channel of a second bandwidth; The second part of the file is sent to the second electronic device through the 2.4G channel of the second bandwidth based on the second communication connection; the second part is the part of the file except the first part.
4. The method according to claim 2, characterized in that: Before the first electronic device turns off the wireless local area network WLAN service, the method further includes: The first electronic device displays prompt information, where the prompt information is used to prompt whether to close the WLAN service when transferring the file; An operation of shutting down the WLAN service is detected.
5. The method according to claim 4, characterized in that The prompt information also includes the time required to transmit the file.
6. The method according to any one of claims 1 to 5, characterized in that After establishing a first communication connection with a second electronic device based on the DFS channel, the method further includes: The first electronic device starts the CAC detection.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: In response to the file sharing operation, when the first electronic device determines that there is no routing device using the DFS channel, or determines that the first electronic device is not indoors, a first communication connection is established with the second electronic device based on a 5G channel of a third bandwidth, and a second communication connection is established with the second electronic device based on a 2.4G channel of the second bandwidth; the third bandwidth is less than the first bandwidth; The third part of the file is sent to the second electronic device through the 5G channel of the third bandwidth based on the first communication connection, and the fourth part of the file is sent to the second electronic device through the 2.4G channel of the second bandwidth based on the second communication connection; the fourth part is the part of the file other than the third part.
8. The method according to any one of claims 2 to 7, characterized in that: After determining that the file transfer is completed, the first electronic device enables the WLAN service.
9. The method according to any one of claims 2 to 8, characterized in that: The first communication connection includes a point-to-point P2P connection, and the second communication connection includes a soft access point softAP connection.
10. The method according to any one of claims 3 to 5, characterized in that: The ratio of the size of the first part in the file to the size of the second part in the file is determined based on a data transmission rate on a 5G channel of the first bandwidth and a data transmission rate on a 2.4G channel of the second bandwidth.
11. The method according to claim 10, characterized in that The ratio of the size of the first part in the file to the size of the second part in the file is equal to the rounded value of the ratio of the data transmission rate on the 5G channel of the first bandwidth to the data transmission rate on the 2.4G channel of the second bandwidth.
12. An electronic device, characterized in that: include: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute the method as described in any one of claims 1-11.
13. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 11.
14. A chip system, the chip system is applied to electronic equipment, characterized in that: The chip system includes one or more processors, and the processor is used to call computer instructions so that the electronic device executes the method as described in any one of claims 1-11.
Citation Information
Patent Citations
Wireless communication system with discrimination between extraneous received signals
CN110637473A
Wireless communication system and method
CN113472477A
System and method for optimizing channel switch mechanism between DFS channels
CN113853001A
Communication method and electronic equipment
CN114364026A
Channel switching method and device, AP equipment and storage medium
CN114423057A