File transfer method and electronic device
By skipping CAC detection under certain conditions, electronic devices can concurrently transmit files using a 160M bandwidth 5G channel and a 40M bandwidth 2.4G channel, solving the problem of low transmission efficiency of the DFS channel and achieving more efficient file transfer.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2026-03-20
AI Technical Summary
In the IEEE 802.11ac standard, electronic devices need to perform channel validity detection (CAC) when using the DFS channel for file transfer, which results in the inability to transfer files for up to one minute, reducing transmission efficiency.
The availability of the DFS channel is determined by non-CAC detection. Under certain conditions, electronic devices skip CAC detection and use the 160M bandwidth 5G channel and the 40M bandwidth 2.4G channel to transmit files concurrently, achieving dual-path transmission.
It improves file transfer efficiency, doubles the transfer rate, reduces CAC detection time, avoids WLAN service interference, and makes full use of channel resources.
Smart Images

Figure CN119496777B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of terminals and communication, and particularly relates to a file transmission method and an electronic device. BACKGROUND
[0002] A sharing application of an electronic device provides a function of sharing data such as a file to other electronic devices. When sharing a file, the electronic device can use a 5Ghz channel with a bandwidth of 80Mhz (referred to as 80M bandwidth) to transmit the file to other electronic devices.
[0003] With the continuous development of communication technology, the wireless communication standard of institute of electrical and electronics engineers (IEEE) 802.11ac has been widely applied. In the IEEE 802.11ac standard, the electronic device can use a dynamic frequency selection (DFS) channel (a 5Ghz channel with a bandwidth of 160Mhz (referred to as 160M bandwidth)) to communicate with other electronic devices, thereby improving the efficiency of file transmission. Since the working frequency band of the global radar system is 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 the electronic device using the DFS channel and the global radar system, the electronic device needs to perform 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 transmission based on the DFS channel. The execution time of the CAC detection is 1 minute. This means that during the 1 minute, the electronic device cannot perform file transmission even if it receives an instruction to perform file transmission, which reduces the efficiency of file transmission.
[0004] How to improve the efficiency of file transmission is worth discussing. SUMMARY
[0005] This application provides a file transfer method and an electronic device. The electronic device can determine the availability of the DFS channel using a non-CAC detection method. When the DFS channel is available, skipping one CAC detection, electronic device 100 directly uses the DFS channel to initiate a 5GP2P communication connection with electronic device 200. Furthermore, the electronic device can also use a 40M bandwidth 2.4G channel to initiate a 2.4G softAP communication connection. Subsequently, files are transferred concurrently using both the P2P link and the softAP link. Implementing the technical solution provided in this application can improve the efficiency of file transfer.
[0006] In a first aspect, this application provides a file transfer method, the method comprising: in response to a file sharing operation, a first electronic device determining that a routing device is using a Dynamic Frequency Selection (DFS) channel, and determining that the first electronic device is indoors, disabling Channel Availability Detection (CAC) and establishing a first communication connection with a second electronic device based on the DFS channel, wherein 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 at a first frequency; the file is larger than a preset threshold; and the first electronic device sends the file to the second electronic device through the 5G channel with the first bandwidth based on the first communication connection.
[0007] In the above embodiments, the first electronic device can be the electronic device 100 involved in the following embodiments, and the second electronic device can be the electronic device 200 involved in the following embodiments. The first bandwidth can be the 160M bandwidth involved in the following embodiments. Compared with the scheme of using 80M bandwidth for file transfer, using 160M bandwidth for file transfer can double the transfer rate. Moreover, when performing file transfer, using a non-CAC detection method to determine the availability of the DFS channel can save the time involved in CAC detection (usually 1 minute).
[0008] In conjunction with the first aspect, in some embodiments, when the first electronic device determines that a routing device is using the Dynamic Frequency Selection (DFS) channel and determines that the first electronic device is indoors, the method further includes: the first electronic device disabling the Wireless Local Area Network (WLAN) service.
[0009] In the above embodiments, the WLAN services that are disabled are those other than file transfers that require the use of 5G or 2.4G channels. Disabling the WLAN service in the first electronic device prevents interference with file transfers during data transmission.
[0010] In some embodiments of the first aspect, the first electronic device sends the file to the second electronic device through the first bandwidth 5G channel based on the first communication connection, specifically comprising: sending a first part of the file to the second electronic device through the first bandwidth 5G channel based on the first communication connection; after the WLAN service is closed, when the first electronic device establishes the first communication connection with the second electronic device based on the DFS channel, the method further comprises: the first electronic device also establishes a second communication connection with the second electronic device based on a second bandwidth 2.4G channel; sending a second part of the file to the second electronic device through the second bandwidth 2.4G channel based on the second communication connection; the second part is a part of the file other than the first part.
[0011] In the above embodiments, the first part of the file can be the sub-file 11 involved in the following embodiments, and the second part of the file can be the sub-file 21 involved in the following embodiments. The second bandwidth can be 40M bandwidth or 20M bandwidth, etc. involved in the following embodiments. Among them, in the dual-channel transmission, the first electronic device can divide the file into two sub-files, and use two channels (including 5G channel and 2.4G channel) to transmit concurrently, thereby improving the efficiency of file transmission. When concurrently using the 5G channel of 160M bandwidth and the 2.4G channel of 40M bandwidth, the real-time transmission rate of the first electronic device can be improved from 60MB / s to 150MB / s compared with using the 5G channel of 80M bandwidth.
[0012] In some embodiments of the first aspect, before the first electronic device closes the WLAN service, the method further comprises: the first electronic device displays prompt information, the prompt information being used to prompt whether to close the WLAN service when transmitting the file; and detecting an operation of closing the WLAN service.
[0013] In the above embodiments, since the file is a large file, the transmission time is usually long, and therefore the prompt information can be displayed to provide the user with the option of whether to close the WLAN service.
[0014] In some embodiments of the first aspect, the prompt information further comprises the time required for transmitting the file.
[0015] In the above embodiments, the time required for transmitting the file is provided, which can further help the user to analyze whether to select to close the WLAN service. The time required for transmitting the file is determined by the first electronic device based on the channel used when transmitting the file and the size of the file. When the used channel is the same, the larger the file, the greater the transmission rate.
[0016] With reference to the first aspect, in some embodiments, after the first electronic device establishes the first communication connection with the second electronic device based on the DFS channel, the method further includes: the first electronic device starting the CAC detection.
[0017] With reference to the first aspect, in some embodiments, the method further includes: in response to the operation of sharing the file, the first electronic device determining that there is no routing device using the DFS channel, or determining that the first electronic device is not in an indoor environment, establishing the first communication connection with the second electronic device based on a 5G channel of a third bandwidth, and further establishing a second communication connection with the second electronic device based on a 2.4G channel of a second bandwidth; the third bandwidth is less than the first bandwidth; sending a third part of the file to the second electronic device based on the first communication connection through the 5G channel of the third bandwidth, and sending a fourth part of the file to the second electronic device based on the second communication connection through the 2.4G channel of the second bandwidth; the fourth part is a part of the file other than the third part.
[0018] In the above embodiments, the third bandwidth can be 80M bandwidth involved in the following embodiments. The third part of the file can be sub-file 12 involved in the following embodiments, and the fourth part of the file can be sub-file 22 involved in the following embodiments. Here, sub-file 12 is smaller than sub-file 11. Sub-file 22 is larger than sub-file 21.
[0019] With reference to the first aspect, in some embodiments, after determining that the file transmission is completed, the first electronic device starts the WLAN service.
[0020] With reference to 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] With reference to the first aspect, in some embodiments, the ratio of the size of the first part of the file to the size of the second part of the file is determined based on a data transmission rate on the 5G channel of the first bandwidth and a data transmission rate on the 2.4G channel of the second bandwidth.
[0022] With reference to the first aspect, in some embodiments, the ratio of the size of the first part of the file to the size of the second part of the file is equal to a value obtained by rounding off a ratio of a data transmission rate on the 5G channel of the first bandwidth to a data transmission rate on the 2.4G channel of the second bandwidth.
[0023] In the above embodiments, the data transmission rate ratio based on the channel determines the division of the file, which can make the 5G channel and the 2.4G channel balanced for file transmission, maximize the use of both channels (including the 5G channel and the 2.4G channel) in the transmission state, and fully utilize the channels.
[0024] In a second aspect, an electronic device is provided. The electronic device includes one or more processors and a memory. The memory is coupled to the one or more processors. The memory is configured to store computer program code including computer instructions. The one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method as implemented in the first aspect.
[0025] In a third aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes instructions. When the instructions are run on an electronic device, the electronic device is caused to perform the method as implemented in the first aspect.
[0026] In a fourth aspect, a chip system is provided. The chip system is applied to an electronic device. The chip system includes one or more processors. The processor is configured to invoke computer instructions to cause the electronic device to perform the method as implemented in the first aspect.
[0027] In a fifth aspect, a computer program product is provided. The computer program product includes instructions. When the computer program product is run on an electronic device, the electronic device is caused to perform the method as implemented in the first aspect.
[0028] It can be understood 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 perform the method provided in the embodiments of the present application. Therefore, the other beneficial effects thereof can refer to the beneficial effects in the corresponding method, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1A and Figure 1B A set of example user interfaces involved when the electronic device 100 transmits a file is shown;
[0030] Figure 2 An example diagram involved when the electronic device 100 and the electronic device 200 perform file transmission is shown;
[0031] Figure 3 An example system structure block diagram of the electronic device 100 in some embodiments is shown;
[0032] Figure 4 An interaction flow diagram between the modules in the electronic device 100 when the electronic device 100 transmits a file to the electronic device 200 is shown;
[0033] Figure 5 An example flowchart involved when the electronic device 100 transmits a file to the electronic device 200 is shown;
[0034] Figure 6An exemplary flowchart showing the electronic device 100 determining whether the DFS channel is available;
[0035] Figure 7 An exemplary schematic diagram showing the communication types involved when the electronic device 100 transmits a file to the electronic device 200;
[0036] Figure 8 FIG. 1 is a schematic diagram of the structure of the electronic device 100 provided by an embodiment of the present application. DETAILED DESCRIPTION
[0037] The terminology used in the following embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the specification and the appended claims, the singular forms "a," "an" and "the" are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or," as used in the specification and in the claims, is used to allow for
[0038] Hereinafter, the terms "first" and "second" are used only for the purpose of description and should not be understood as implying or suggesting relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.
[0039] In one scheme, when the electronic device 100 detects the operation of sharing a file, in the case where condition 1 is met, the electronic device 100 can skip the CAC detection and directly use the DFS channel (5G channel with 160M bandwidth) for file transmission. In the case where condition 1 is not met, the electronic device 100 uses the 5G channel with 80M bandwidth to transmit the file to the electronic device 200.
[0040] The 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 through other ways than CAC detection. The condition 1 at least includes condition 11: in response to the operation of sharing a file, the electronic device 100 determines that there is a routing device using the DFS channel, and determines that the electronic device 100 is indoors. The routing device is used to determine whether the DFS channel is available after the CAC detection at a preset frequency (which can also be referred to as a first frequency). In some possible cases, the condition 1 can include, in addition to the condition 11: the file to be transmitted is greater than a preset threshold, for example, 1GB.
[0041] In the foregoing, the file transmission by the electronic device 100 using the DFS channel (5G channel with 160M bandwidth) includes that the electronic device 100 starts 5G peer-to-peer (P2P) communication with 160M bandwidth. Then, the electronic device 100 establishes a P2P communication connection with the electronic device 200 based on the DFS channel. Then, the electronic device 100 transmits the file to the electronic device 200 based on the P2P communication connection through the DFS channel. The file transmission by the electronic device 100 using the 5G channel with 80M bandwidth includes that the electronic device 100 starts 5G P2P communication with 80M bandwidth. Then, the electronic device 100 establishes a P2P communication connection with the electronic device 200 based on the 5G channel with 80M bandwidth. Then, the electronic device 100 transmits the file to the electronic device 200 based on the P2P communication connection through the 5G channel with 80M bandwidth.
[0042] Since the routing devices around the electronic device 100 will first perform CAC detection to determine whether the DFS channel is available before using the DFS channel for communication according to the IEEE 802.11ac communication standard, it can be determined whether the DFS channel is available by whether there is a routing device around the electronic device 100 using the DFS channel. At the same time, it is determined that the electronic device 100 uses the DFS channel indoors because the requirements for using the DFS channel indoors are lower than those for using the DFS channel outdoors, and the electronic device 100 uses the DFS channel indoors is beneficial to ensure the reliability of file transmission. Moreover, compared with file transmission using the 5Ghz channel with 80M bandwidth, reducing 1 minute of CAC detection but still using the DFS channel for file transmission can improve the efficiency of file transmission.
[0043] It can also be understood that whether the electronic device 100 uses the DFS channel by whether condition 1 is met is determined by a non-CAC detection method. The non-CAC detection method can 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 transmission faster.
[0044] In some possible cases, in response to the operation of sharing the file, the electronic device 100 can close the WLAN service. Because the WLAN service of the electronic device 100 can communicate based on the 5G channel. If the frequency range of the 5G channel (160M bandwidth or 80M bandwidth) used for file transmission is repeated with the frequency range of the 5G channel used by the WLAN service, the WLAN service will interfere with file transmission. Closing the WLAN service can avoid the interference of the WLAN service with file transmission.
[0045] In some other possible cases, for an electronic device 100 supporting dual-band dual-channel (DBDC), when performing file transmission, in addition to using a 5G channel (160M bandwidth or 80M bandwidth), a 2.4G channel can also be used concurrently to perform file transmission. In this way, the efficiency of file transmission can be further improved. At this time, in addition to establishing a P2P communication connection with the electronic device 200 based on the 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 the 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.4G channel can also be other values, such as 20M, and the embodiments of the present application do not limit this.
[0046] It should be understood here that the bandwidth of a channel refers to the frequency range used for transmitting data (for example, a file) in wireless communication. The bandwidth can also be referred to as the frequency bandwidth. The 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 that of a 5G channel with a bandwidth of 80M.
[0047] Figure 1A and Figure 1B A set of exemplary user interfaces involved when the electronic device 100 transmits a file is shown.
[0048] The exemplary process of the electronic device 100 transmitting a file is described below. Figure 1A and Figure 1B The exemplary process of the electronic device 100 transmitting a file is described below.
[0049] As Figure 1A As shown in (1) of the above-mentioned
[0050] For example, reference is made to the following Figure 1AAs shown in Figure (2), user interface 23 is an exemplary user interface for selecting the sending method. In response to an operation (e.g., a click) on the "Share" control 231, electronic device 100 can initiate one or both of 5GP2P and 2.4G softAP. Subsequently, electronic device 100 searches a list of devices that can communicate and displays, as shown in Figure (2). Figure 1A The user interface 24 shown in (3) displays the list of devices.
[0051] refer to Figure 1A In the user interface 24 shown in (3), in response to the operation of selecting device icon 241 (e.g., clicking), electronic device 100 can establish a P2P communication connection with electronic device 200 based on a 5G channel (160M bandwidth or 80M bandwidth) by using the electronic device associated with device icon 241 as electronic device 200. Files are then transferred to electronic device 200 based on this P2P communication connection. Alternatively, in response to the operation of selecting device icon 241 (e.g., clicking), electronic device 100 establishes a P2P communication connection with electronic device 200 based on a 5G channel (160M bandwidth or 80M bandwidth) and a softAP communication connection based on a 2.4G channel. Files are then transferred to electronic device 200 based on both the P2P and softAP communication connections.
[0052] It should be understood how the bandwidth of the 5G channel is determined, and whether the electronic device 100 uses single-channel or dual-channel transmission. Please refer to the descriptions of the relevant content above; they will not be repeated here.
[0053] In this context, single-channel transmission refers to electronic device 100 using only the 5G channel for file transfer or only the 2.4G channel for file transfer. Dual-channel transmission refers to electronic device 100 using both the 5G channel and the 2.4G channel for file transfer.
[0054] In some possible scenarios, in response to an operation on the selected device icon 241 (e.g., a click), electronic device 100 may not begin file transfer after establishing a communication connection with electronic device 200. Before starting file transfer, electronic device 100 may display a prompt message asking the user to choose whether to disable the WLAN service. This prompt message may also display the estimated time required for file transfer. After electronic device 100 confirms whether to disable the WLAN service, electronic device 100 then begins transferring files to electronic device 200. For example, see reference... Figure 1B User interfaces 25a and 26a shown in Figure (1) are schematic user interfaces for transferring files when the electronic device 100 has not turned off the WLAN service. (See reference...) Figure 1BThe user interfaces 25b and 26b shown in FIG. 2 are exemplary user interfaces for the electronic device 100 to transmit the file when the WLAN service is closed. In response to the operation on the "Confirm" control 251, the electronic device 100 can transmit the file to the electronic device 200.
[0055] It should be understood herein that the display of the prompt information is optional to determine whether to close the WLAN service. In some possible cases, the electronic device 100 can close the WLAN service by default when the file transmission is performed, and the prompt information is not displayed.
[0056] It should be understood herein that the foregoing Figure 1A In addition Figure 1B The user interfaces involved in the transmission of the file in FIGS. 2 to 4 are a set of exemplary user interfaces. In actual cases, the user interfaces involved in the transmission of the file can include more or fewer control operations, and display more or fewer information. This should not be construed as a limitation on the embodiments of the present application.
[0057] Referring to Figure 2 FIG. 5 is an exemplary diagram of the electronic device 100 involved in the transmission of the file with the electronic device 200.
[0058] Figure 2 The transmission of the file is taken as an example of dual-channel transmission. When the file is transmitted, the electronic device 100 divides the file into sub-file 1 and sub-file 2. The electronic device 100 can transmit the sub-file 1 to the electronic device 200 through the 5G channel with a bandwidth of 160M based on the 5G P2P communication connection, and the electronic device 100 can transmit the sub-file 2 to the electronic device 200 through the 2.4G channel with a bandwidth of 40M based on the 2.4G softAP communication connection.
[0059] Some exemplary system structures of the electronic device 100 in some embodiments are described below.
[0060] It should be understood that the software structure of the electronic device 200 is similar or identical to that of the electronic device 100. The software structure of the electronic device 100 is taken as an example for description, and the software structure of the electronic device 200 can be referred to the related description, which is not described herein.
[0061] Referring to Figure 3 As shown in FIG. 6, the layered architecture divides the system into several layers, each layer has a clear role 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, the application layer, the framework layer, the hardware abstraction layer (HAL), the kernel layer, and the firmware layer.
[0062] In some cases, the hardware abstraction layer can 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. This sharing application may include a "nearby" function. This "nearby" function provides an interface for sharing data (such as files). This "nearby" function can call the Wi-Fi extension manager to access various interfaces of the application framework layer.
[0065] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0066] The application framework layer may include a Wi-Fi extension manager, a connection manager, a P2P module, and a softAP module.
[0067] The WiFi extension manager enables calls between various interfaces in the application layer and various interfaces in 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 initiate P2P communication and the softAP module to initiate softAP communication.
[0070] The WLAN management module is used to manage the switching on and off of WLAN services.
[0071] The P2P module includes a P2P management module, a SupplicantP2PlfaceCallback module, and a SupplicantP2PlfaceHalEx module.
[0072] The P2P module is configured to be 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 configured to call the SupplicantP2PlfaceHalEx module to issue an instruction for establishing a P2P communication connection. The P2P management module is configured to call the SupplicantP2PlfaceHalEx module to issue an instruction for establishing a connection with the electronic device 200 based on P2P communication. The P2P management module is further configured to receive a result of starting P2P communication through the SupplicantP2PlfaceCallback module and receive a 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 configured to be 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 configured to call the HostapdHal module to issue an instruction for establishing a softAP communication connection and receive a result of starting softAP communication sent by the HostapdHal module. The softAP management module is further configured to call the HostapdHal module to issue an instruction for establishing a connection with the electronic device 200 based on softAP communication and receive a 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 between the application framework layer and the kernel layer of the system, and the purpose is to abstract hardware and provide a virtual hardware platform for the system.
[0076] The hardware abstraction layer can include a wpa_supplicant module and a Hostapd module.
[0077] The wpa_supplicant module is configured to call a Wifi driver to trigger Wifi hardware to start P2P communication after receiving an instruction for starting P2P communication issued by the SupplicantP2PlfaceHalEx module.
[0078] The Hostapd module is configured to call a Wifi driver to trigger Wifi hardware to start softAP communication after receiving an instruction for starting softAP communication issued by the HostapdHal module.
[0079] The kernel layer is a layer between hardware and software. The kernel layer can include a Wifi driver.
[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 can 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 inform the upper layer module to respond to the communication request through the Wifi driver after receiving the communication request sent by the electronic device 200 to the electronic device 100, so as to establish a communication connection between the electronic device 100 and the electronic device 200.
[0083] The interaction process between the modules in the electronic device 100 when transmitting a file to the electronic device 200 will be described in detail below in combination with the above-mentioned software structure.
[0084] Here, the electronic device 100 transmits a file to the electronic device 200 through dual-channel transmission including 5G P2P and 2.4G softAP. At this time, the interaction process involved when the electronic device 100 transmits a file to the electronic device 200 can refer to the description of steps S201-S216 below.
[0085] S201. The sharing application responds to the operation of sharing a file through the nearby function.
[0086] The operation of sharing a file through the nearby function includes the operation of the "share" control 231 shown in (2) of the above-mentioned software structure. Figure 1A The sharing application responds to the operation of sharing a file through the nearby function, which can trigger the operation of transmitting a file through dual-channel transmission including 5G P2P and 2.4G softAP. The detailed description of the process can refer to the description of steps S201-S216 below.
[0087] S202. The DFS channel management module determines that the file is greater than a preset threshold.
[0088] The preset threshold can be set to 1GB. It can also be a value greater than or less than 1GB, such as 2GB, etc., which is not limited by the embodiments of the present application.
[0089] S203. The DFS channel management module in the connection management module determines that the electronic device 100 supports dual-frequency dual-channel.
[0090] The DFS channel management module determines that the electronic device 100 supports dual-band dual-channel in the following ways, but not limited to: the DFS channel management module can check whether the electronic device 100 lists 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 using 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 using DFS channel in the following ways, but not limited to: determining that the chip capability of the electronic device 100 supports using channel bandwidth up to 160M, and determining that the country code in the electronic device 100 is CN.
[0093] Determining that the electronic device 100 supports using DFS channel means that the electronic device 100 has the capability of using DFS channel. Then, the DFS channel management module can further determine to use DSF channel when transmitting files in a non-CAC detection manner. The process of determining to use DSF channel when transmitting files can be referred to the description of steps S205-S209 below.
[0094] S205. The DFS channel management module acquires DFS list.
[0095] The DFS list includes at least one routing device and the corresponding center frequency of each routing device. The center frequency corresponding to one routing device represents the average of the lowest frequency and the highest frequency on the channel used by the routing device.
[0096] Generally, the DFS list acquired in this step S205 is acquired by the DFS channel management module through active detection. Active detection refers to that after the DFS channel management module determines that the electronic device 100 supports using DFS channel, the WLAN scanning function is started to acquire the DFS list.
[0097] S206. The DFS channel management module determines through the DFS list that there is an electronic device other than the electronic device 100 around using DFS channel.
[0098] The DFS channel includes 8 channels in total, and one device can use one or more of the 8 channels when using the DFS channel. The 8 channels are channel 36, channel 40, channel 44, channel 48, channel 52, channel 56, channel 60 and channel 64. Each of the 8 channels has a frequency width of 20 Mhz, and the first 4 channels (channel 36, channel 40, channel 44 and channel 48) of the 8 channels belong to the DFS channel and 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 is a routing device using the DFS channel in the DFS list. 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 is an electronic device (routing device) other than the electronic device 100 using the DFS channel around the electronic device 100.
[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 by the electronic device 100. The satellite includes a global navigation satellite system (GNSS) satellite.
[0102] In some possible cases, the DFS channel management module determines that the electronic device 100 is indoors when the number of satellites connected by the electronic device 100 is less than or equal to 10.
[0103] In some possible cases, the DFS channel management module determines that the electronic device 100 is indoors when the difference between the number of satellites discovered by the electronic device 100 and the number of satellites connected by the electronic device 100 is greater than or equal to 5.
[0104] In another possible case, the DFS channel management module determines that the electronic device 100 is indoors when the number of satellites discovered by the electronic device 100 is greater than or equal to 35, but the number of satellites connected by the electronic device 100 is less than or equal to 30.
[0105] S208. The WLAN management module in the connection management module closes the WLAN service.
[0106] The WLAN service closed here is other service requiring 5G channel or 2.4G channel except file transmission.
[0107] In some possible implementation manners, when the DFS channel management module determines that there is a routing device using DFS channel and determines that the electronic device 100 is indoors, the DFS channel management module can notify the connection management module to close the WLAN service.
[0108] In another possible implementation manner, when the DFS channel management module determines that there is a routing device using DFS channel and determines that the electronic device 100 is indoors, the DFS channel management module can notify the sharing application to display prompt information, the prompt information being used to prompt whether to close the WLAN service when transmitting a file. The sharing application closes the WLAN service through the connection management module in response to detecting the operation of closing the WLAN service. The related description of the prompt information can be referred to the description of the related content in the foregoing Figure 1B , which will not be described here again.
[0109] S209. The DFS channel management module closes the CAC detection.
[0110] The DFS channel management module can close the CAC detection when the DFS channel management module determines that there is a routing device using DFS channel and determines that the electronic device 100 is indoors.
[0111] S210a. The P2P starting module starts 5G P2P with a bandwidth of 160M.
[0112] The P2P starting module creates a P2P group and determines that the electronic device 100 is a group owner (GO) of the P2P group. Subsequently, the following step S211a is performed to add a device other than the electronic device 100 to the P2P group, and the devices in the P2P group can communicate based on 5G P2P with a bandwidth of 160M.
[0113] It should be understood that the P2P starting module is not directly shown in the foregoing Figure 3 , and the P2P starting module can include the related modules for starting P2P communication involved in the foregoing Figure 3 .
[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. One device (e.g., the electronic device 200) is selected from the list of devices to initiate a connection request. After receiving a response from the electronic device 200 to confirm the connection, the electronic device 100 establishes a 5G P2P communication connection with the electronic device 200. At this point, the electronic device 200 joins a P2P group (group client, GC) as a group client.
[0116] It should be understood herein that the P2P connection module is not directly shown in the foregoing Figure 3 , and can include the related modules involved in the foregoing Figure 3 for the electronic device 100 to establish a connection with the electronic device 200 through 5G P2P.
[0117] The softAP startup module starts a 40M bandwidth 2.4G softAP.
[0118] The softAP startup module sets the electronic device 100 as an access point (AP). The following step S211b is performed to connect devices other than the electronic device 100 to the AP, so that the devices (e.g., the electronic device 200) connected to the AP can communicate with the electronic device 100 based on the 40M bandwidth 2.4G softAP.
[0119] It should be understood herein that the softAP startup module is not directly shown in the foregoing Figure 3 , and can include the related modules involved in the foregoing Figure 3 for starting softAP communication.
[0120] S211b. The softAP connection module establishes a connection between the electronic device 100 and the electronic device 200 through the 2.4G softAP.
[0121] After the softAP connection module receives a connection request sent by the electronic device 200, the electronic device 100 selects to establish a 2.4G softAP communication connection with the electronic device 200, which indicates 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: after the electronic device 200 initiates a device scan and scans an accessible AP (created by the electronic device 100), the electronic device 200 can send a connection request to the electronic device 100 to access the AP.
[0122] It should be understood herein that the softAP connection module is not directly shown in the foregoing Figure 3 , and can include the related modules involved in the foregoing Figure 3The related modules involved in the present application for electronic device 100 to establish connection with electronic device 200 through 2.4G softAP.
[0123] The exemplary user interface involved in the present application when electronic device 100 establishes communication (including 5G P2P communication and 2.4G softAP) connection with electronic device 200 can refer to the user interface 24 shown in the foregoing Figure 1A
[0124] S212. DFS channel management module divides the file into sub-file 11 and sub-file 21.
[0125] DFS channel management module divides the file into N1 packets, sub-file 11 includes N11 packets, and sub-file 21 includes other packets (denoted as N12 packets) except the N11 packets in N packets.
[0126] In some possible cases, the sizes of sub-file 11 and sub-file 21 are determined before starting to transmit the file, at this time, the ratio of the sizes of sub-file 11 and sub-file 21 is determined based on the data transmission rate on 160M bandwidth 5G channel (DFS channel) and the data transmission rate on 40M bandwidth 2.4G channel. For example, the ratio of the sizes of sub-file 11 and sub-file 21 is equal to the value after rounding off the ratio of the data transmission rate on 160M bandwidth 5G channel and the data transmission rate on 40M bandwidth 2.4G channel. Subsequently, the following step S213a is performed to transmit sub-file 1 to electronic device 200 based on DFS channel through P2P link, and the following step S213b is performed to transmit sub-file 2 to electronic device 200 based on 2.4G channel through softAP link.
[0127] For example, the data transmission rate (maximum physical rate) on 160M bandwidth 5G channel is generally 2402Mbps. The data transmission rate on 40M bandwidth 2.4G channel. The value after rounding off the ratio of the data transmission rate on 160M bandwidth 5G channel and the data transmission rate on 40M bandwidth 2.4G channel can be 4. Then, electronic device 100 can take 20% of the file as sub-file 11, and take 80% of the file except 20% as sub-file 21.
[0128] In this way, the 5G channel and the 2.4G channel can be balanced to perform file transmission, and the two channels (including 5G channel and 2.4G channel) are maximized to be in transmission state, and the channels are fully utilized.
[0129] S213a. P2P connection module transmits sub-file 11 to electronic device 200 based on DFS channel through P2P link.
[0130] S213b. The softAP connection module sends the sub-file 21 to the electronic device 200 based on the 2.4G channel through the softAP link.
[0131] For the aforementioned step S212, step S213a and step S213b, in other possible cases, the sizes of the sub-file 11 and the sub-file 21 are not determined before the transmission of the file, but are dynamically adjusted based on the information (such as transmission rate, signal-to-noise ratio, etc.) of the 5G P2P link and the 2.4G softAP link during the transmission process. Then the aforementioned step S212, step S213a and step S213b can not be performed. Instead, the following steps are performed: the DFS channel management module can start at least one flow on the 5G P2P link for transmitting data packets, and at least one flow on the 2.4G P2P link for transmitting data packets. The DFS channel management module can divide the file into N1 data packets, and transmit the data packets on the 5G P2P link through at least one socket according to frequency 1, and transmit the data packets on the 2.4G softAP link through at least one socket according to frequency 2. The ratio of the frequency 1 and the 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 the frequency 1 and the frequency 2 is equal to the ratio of the data transmission rate on the 5G channel with a bandwidth of 160M and the data transmission rate on the 2.4G channel with a bandwidth of 40M after rounding. When the transmission rate of the 5G P2P link becomes slower, the frequency 1 can be reduced, and when the transmission rate of the 5G P2P link becomes faster, the frequency 1 can be increased. When the transmission rate of the 2.4G softAP link becomes slower, the frequency 2 can be reduced, and when the transmission rate of the 2.4G softAP link becomes faster, the frequency 2 can be increased. 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 time of the step S214 includes but is not limited to the following time.
[0134] Starting time 1: after the electronic device 100 establishes a connection with the electronic device 200 based on the DFS channel through the 5G P2P, the DFS channel management module can start CAC detection.
[0135] Opening timing 2: the electronic device 100 performs CAC detection according to the preset frequency, and the foregoing step S209 involves stopping CAC detection, which means skipping one CAC detection, and the skipping time is maintained for 1 minute. After 1 minute, the electronic device 100 continues to perform CAC detection according to the preset frequency.
[0136] S215a. The P2P connection module notifies the DFS channel management module of the end of sharing.
[0137] S215b. The softAP connection module notifies the DFS channel management module of the end of sharing.
[0138] S216. The DFS channel management module opens the WLAN service.
[0139] After receiving the notification of the end of sharing sent by the softAP connection module and receiving the notification of the end of sharing sent by the P2P connection module, the DFS channel management module determines that the file transmission is completed, and the WLAN service can be opened.
[0140] It should be understood here that the execution sequence of the foregoing steps S201 to step S216, the step S203 and the step S204 has no front-back relationship. The execution sequence of the step S206 and the step S207 also has no front-back relationship. The sequence between the foregoing step S208 and the step S210a and the step S210b has no front-back relationship.
[0141] It should be understood here that the foregoing Figure 3 and Figure 4 are described by taking an example of the electronic device 100 transmitting a file to the electronic device 200 through dual-channel transmission including 5G P2P and 2.4G softAP. In actual cases, the electronic device 100 can also determine whether to perform dual-channel transmission. If it is single-channel transmission, the electronic device 100 can only perform file transmission through 5G P2P. The process of the electronic device using different communication connections for file transmission in different cases can be referred to the related content in the following Figure 5 .
[0142] Figure 5 An example flowchart involved in the process of the electronic device 100 transmitting a file to the electronic device 200 is shown.
[0143] The process involved in the process of the electronic device 100 transmitting a file to the electronic device 200 can be referred to the description of the following steps S11 to step S22.
[0144] S11. The electronic device 100 responds to the operation of sharing a file.
[0145] The operation of sharing the file can be the operation of sharing the file through the nearby function in response to the foregoing operation. For details, refer to the description of the foregoing step S201.
[0146] S12. Whether the file size is greater than a preset threshold.
[0147] If the file size is greater than or equal to the preset threshold, the file has a large data volume, and the electronic device 100 can perform the following step S13 to determine whether the file can be transmitted to the electronic device 200 through dual-path transmission.
[0148] If the file size is less than the preset threshold, the file has a small data volume, and the electronic device 100 can perform the following step S18 to transmit the file to the electronic device 200 through single-path transmission.
[0149] S13. Whether the electronic device 100 supports dual-frequency dual-channel.
[0150] When the electronic device 100 supports dual-frequency dual-channel, the electronic device 100 can perform the following step S14 to transmit the file to the electronic device 200 through dual-path transmission after the WLAN service is closed.
[0151] When the electronic device 100 does not support dual-frequency dual-channel, the electronic device 100 can transmit the file to the electronic device 200 through single-path transmission. For details, refer to the description of the following steps S18-S22.
[0152] S14. The electronic device 100 closes the WLAN service.
[0153] The step S14 is optional.
[0154] The WLAN service closed here is a service other than the file transmission that needs to use the 5G channel or the 2.4G channel. In order to prevent the WLAN service from interfering with the file transmission when performing data transmission, the electronic device 100 closes the WLAN service.
[0155] In some possible cases, the timing at which the electronic device 100 closes the WLAN service can be that the WLAN service is closed in response to the operation of sharing the file. The timing can also be other timings.
[0156] S15. Whether the DFS channel is available.
[0157] In the step S15, whether the DFS channel is available is determined through non-CAC detection.
[0158] For details, refer to the description of steps S31-S34 in the following Figure 6 .
[0159] S31. Determine whether the chip of the electronic device 100 supports using DFS channels.
[0160] If it is determined that the chip capability of the electronic device 100 supports using channels with a bandwidth up to 160M, it is determined that the chip supports using DFS channels. At this time, the electronic device 100 can perform the following step S32 to further determine whether the electronic device 100 can use DFS channels.
[0161] If it is determined that the chip capability of the electronic device 100 does not support using channels with a bandwidth up to 160M, it is determined that the chip does not support using DFS channels. At this time, the electronic device 100 can perform the following step S35 to determine that DFS channels are not available.
[0162] S32. Determine whether there is an electronic device other than the electronic device 100 using DFS channels around the electronic device 100.
[0163] The electronic device 100 can determine whether there is a routing device with a center frequency equal to at least one of 5260, 5280, 5300, and 5320 in the DFS list.
[0164] If there is a routing device with a center frequency 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 DFS channels around the electronic device 100. At this time, the electronic device 100 can perform the following step S33 to further determine whether the electronic device 100 can use DFS channels.
[0165] If there is no routing device with a center frequency 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 DFS channels around the electronic device 100. At this time, the electronic device 100 can determine that DFS channels are not available.
[0166] For details about the DFS list and determining whether there is an electronic device other than the electronic device 100 using DFS channels around the electronic device 100 based on the DFS list, refer to the foregoing description of steps S205 and 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 in the indoor environment 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 foregoing description of step S207, which will not be repeated here.
[0169] When the electronic device 100 is in the indoor environment, the electronic device 100 performs step S34 described below to determine that the DFS channel is available.
[0170] When the electronic device 100 is not in the indoor environment, the electronic device 100 performs step S35 described below to determine that the DFS channel is not available.
[0171] S34. Determine that the DFS channel is available.
[0172] S35. Determine that the DFS channel is not available.
[0173] It should be noted here that, in the case where the DFS channel is available, the electronic device 100 can perform step S16a and step S17a described below to perform file transmission using 5G P2P with a bandwidth of 160M and 2.4G softAP with a bandwidth of 40M. Here, when file transmission is performed using 5G P2P with a bandwidth of 160M, the channel used is the DFS channel.
[0174] In the case where the DFS channel is not available, the electronic device 100 can perform step S16b and step S17b described below to perform file transmission using 5G P2P with a bandwidth of 80M and 2.4G softAP with a bandwidth of 40M.
[0175] It should be understood here that the execution order of step S14 and step S15, step S12 and step S13 has no priority.
[0176] When step S15 is performed first and then step S14 is performed, the electronic device 100 can turn off the WLAN service when the DFS channel is available. One case where the DFS channel is available includes that the electronic device 100 determines that there is a routing device using the DFS channel and determines that the electronic device 100 is in the indoor environment.
[0177] Alternatively, when step S15 is performed first and then step S14 is performed, the electronic device 100 can display prompt information to prompt whether to turn off the WLAN service when transmitting a file when the DFS channel is available. In response to the operation of turning off the WLAN service, the electronic device 100 turns off the WLAN service. For a description of the prompt information, reference can be made to the foregoing description of the related content in the foregoing description of step S15, which will not be repeated here. Figure 1B
[0178] S16a. The electronic device 100 starts 160M bandwidth 5G P2P, and starts 40M bandwidth 2.4G softAP.
[0179] In the case that the DFS channel is determined to be available, the electronic device 100 starts 160M bandwidth 5G P2P, and starts 40M bandwidth 2.4G softAP, and uses dual-path transmission to send the file to the electronic device 200. Wherein, the channel used by the electronic device 100 to transmit the file to the electronic device 200 using 160M bandwidth 5G P2P is the DFS channel.
[0180] Wherein, the related content of the electronic device starting 160M bandwidth 5G P2P can refer to the related description of the foregoing step S210a. The related content of the electronic device starting 40M bandwidth 2.4G softAP can refer to the related description of the foregoing step S210b. Details are not described here.
[0181] It should be understood that the 40M involved in the step S16a and the following step S16b is an example, and other bandwidths, such as 20M, can also be used, and the embodiments of the present application do not limit this.
[0182] After the electronic device 100 starts 160M bandwidth 5G P2P, the electronic device 100 can establish a 5G P2P communication connection with the electronic device 200 through 5G P2P. The detailed description of the process can refer to the description of the foregoing step S211a, and details are not described here. After the electronic device 100 starts 40M bandwidth 2.4G softAP, the electronic device 100 can establish a 5G P2P communication connection with the electronic device 200 through 2.4G softAP. The detailed description of the process can refer to the description of the foregoing step S211a, and details are not described here. Subsequently, the electronic device 100 can perform the following step S17a to send the file to the electronic device 200 using dual-path transmission.
[0183] S17a. The electronic device 100 divides the file into sub-file 11 and sub-file 21, sends the sub-file 11 to the electronic device 200 based on the DFS channel through 5G P2P, and sends the sub-file 21 to the electronic device 200 based on the 2.4G channel through 2.4 softAP, and the DFS channel is a 5G channel with a bandwidth of 160M.
[0184] The division method of the sub-file 11 and the sub-file 21 can refer to the description of the related content in the foregoing step S212, and details are not described here.
[0185] It should be understood that step S17a is optional, and the actual transmission process can also use other transmission methods. Refer to the foregoing description of the relevant content when steps S212, S213a, and S213b are not executed; these will not be repeated here.
[0186] S16b. Electronic device 100 initiates 80M bandwidth 5G P2P and 40M bandwidth 2.4G softAP.
[0187] Step S16b is similar to step S16a, except that the content related to the DFS channel is deleted, and the 160M bandwidth is changed to 80M bandwidth. Here, when electronic device 100 uses 80M bandwidth 5G P2P to transfer files to electronic device 200, the channel used is no longer the DFS channel, but a 5G channel with a slower transmission rate than the DFS channel.
[0188] S17b. Electronic device 100 divides the file into sub-file 12 and sub-file 22, sends sub-file 12 to electronic device 200 via 5G P2P based on an 80M bandwidth 5G channel, and sends sub-file 22 to electronic device 200 via 2.4G softAP based on a 2.4G channel.
[0189] Step S17b is similar to the aforementioned step S17a, except that the relevant content of the DFS channel is deleted and the 160M bandwidth is changed to 80M bandwidth, which will not be described in detail here.
[0190] It should be understood here that sending sub-file 1 (sub-file 11 with 160M bandwidth or sub-file 12 with 80M bandwidth) to electronic device 200 via 5G P2P using a 5G channel with 160M or 80M bandwidth can also be understood as sending sub-file 1 to electronic device 200 via a P2P communication connection using a 5G channel with 160M or 80M bandwidth. In this case, the P2P communication connection is a 5G P2P communication connection. Sending sub-file 2 (sub-file 21 or sub-file 22) to electronic device 200 via a 2.4G channel can also be understood as sending sub-file 2 to electronic device 200 via a 2.4G channel with 40M bandwidth using a softAP communication connection. In this case, the softAP communication connection is a 2.4G softAP communication connection.
[0191] S18. Is the DFS channel available?
[0192] Step S18 is the same as step S15 mentioned above, and can be referred to the description of step S15 above, so it will not be repeated here.
[0193] This step S18 is optional, and the electronic device 100 can not execute step S18, and directly execute the following step S21 and step S22. In the case where step S18 is not executed, the following step S19 and step S20 are also not executed.
[0194] S19. The electronic device 100 starts 160M bandwidth 5G P2P.
[0195] In the case where dual-frequency dual-channel is not supported but DFS channel is available, the electronic device 100 starts 160M bandwidth 5G P2P, and uses single-channel transmission to send the file to the electronic device 200. Wherein, the channel used by the electronic device 100 when transmitting the file to the electronic device 200 using 160M bandwidth 5G P2P is a DFS channel.
[0196] Wherein, the content related to the electronic device 100 starting 160M bandwidth 5G P2P can refer to the foregoing description of step S210a, and will not be repeated here.
[0197] After the electronic device 100 starts 160M bandwidth 5G P2P, the electronic device 100 can establish a 5G P2P communication connection with the electronic device 200 through 5G P2P. The detailed description of this process can refer to the foregoing description of step S211a, and will not be repeated here. Subsequently, the electronic device 100 can execute the following step S20 to use single-channel transmission to send the file to the electronic device 200.
[0198] S20. The electronic device 100 sends the file to the electronic device 200 through 5G P2P based on 160M 5G channel.
[0199] S21. The electronic device 100 starts 80M bandwidth 5G P2P.
[0200] This step S21 is similar to the content in the foregoing step S19, and the content related to the DFS channel is deleted, and the 160M bandwidth is changed to 80M bandwidth. Here, the channel used by the electronic device 100 when transmitting the file to the electronic device 200 using 80M bandwidth 5G P2P is no longer a DFS channel. But 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 through 5G P2P based on 80M 5G channel.
[0202] It should be understood that the foregoing 5G P2P communication connection and 2.4G softAP communication connection are examples and should not be construed as a limitation on the embodiments of the present application. In single-path transmission, the foregoing description is based on the use of a 5G P2P connection as an example, and in fact, a 5G softAP connection can also be used. Alternatively, in single-path transmission, a 2.4G channel can also be used for transmission. When using a 2.4G channel to transmit a file to the electronic device 200, the type of communication connection between the electronic device 200 can be a 2.4G P2P connection or a 2.4G softAP connection, and the embodiments of the present application do not limit the type of communication connection. In dual-path transmission, as long as one path uses a 5G channel and the other path uses a 2.4G channel. In dual-path transmission, the type of communication connection corresponding to the 5G channel can be a 2.4G P2P connection or a 2.4G softAP connection, and the type of communication connection corresponding to the 2.4G channel can be a 2.4G P2P connection or a 2.4G softAP connection.
[0203] For dual-path transmission, refer to Figure 7 , Figure 7 The DFS channel is available, and the electronic device 100 transmits a file to the electronic device 200. For DFS unavailable conditions, refer to the related content, which will not be described here.
[0204] As shown in (1) of Figure 7 , in dual-path transmission and when the DFS channel is available, the electronic device 100 divides the file into subfile 1 and subfile 2 when transmitting the file. The electronic device 100 can transmit subfile 1 to the electronic device 200 through a 5G channel with a bandwidth of 160M based on a 5G P2P communication connection, and the electronic device 100 can transmit subfile 2 to the electronic device 200 through a 2.4G channel with a bandwidth of 40M based on a 2.4G softAP communication connection.
[0205] As shown in (2) of Figure 7 , in dual-path transmission and when the DFS channel is available, the electronic device 100 divides the file into subfile 1 and subfile 2 when transmitting the file. The electronic device 100 can transmit subfile 1 to the electronic device 200 through a 5G channel with a bandwidth of 160M based on a 5G softAP communication connection, and the electronic device 100 can transmit subfile 2 to the electronic device 200 through a 2.4G channel with a bandwidth of 40M based on a 2.4G P2P communication connection.
[0206] As shown in (3) of Figure 7As shown in (3), when the file is transmitted, the electronic device 100 divides the file into sub-file 1 and sub-file 2 when dual-path transmission and DFS channel is available. The electronic device 100 can transmit the sub-file 1 to the electronic device 200 through the 5G channel with 160M bandwidth based on the 5G P2P (denoted as P2P0) communication connection, and the electronic device 100 can transmit the sub-file 2 to the electronic device 200 through the 2.4G channel with 40M bandwidth based on the 2.4G P2P (denoted as P2P1) communication connection.
[0207] As shown in (3), when the file is transmitted, the electronic device 100 divides the file into sub-file 1 and sub-file 2 when dual-path transmission and DFS channel is available. The electronic device 100 can transmit the sub-file 1 to the electronic device 200 through the 5G channel with 160M bandwidth based on the 5G P2P (denoted as P2P0) communication connection, and the electronic device 100 can transmit the sub-file 2 to the electronic device 200 through the 2.4G channel with 40M bandwidth based on the 2.4G P2P (denoted as P2P1) communication connection. Figure 7
[0208] The following describes an exemplary electronic device 100 provided by an embodiment of the present application.
[0209] Figure 8 FIG. 1 is a structural schematic diagram of the electronic device 100 provided by an embodiment of the present application.
[0210] It should be understood herein that the electronic device 100 and the electronic device 200 are similar or identical in structure, and the structure of the electronic device 100 is described herein, and the description of the electronic device 200 can be referred to the related content, which will not be described herein.
[0211] The following describes an embodiment by taking the electronic device 100 as an example. It should be understood that the electronic device 100 can have more or fewer components than those shown in (1), two or more components can be combined, or can have a different component configuration. Figure 8 The various components shown in (1) can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits. Figure 8 The various components shown in (1) can 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] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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 understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0214] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or 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 solutions for wireless communication, including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) networks), etc., which are applied on the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 also provides a basis for supporting dual-band dual-channel for the electronic device 100.
[0216] In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology.
[0217] In the embodiments of the present application, the processor 110 can invoke the computer instructions stored in the internal memory 121 to enable the terminal to perform the file transmission method in the embodiments of the present application.
[0218] The electronic device 100 can also include a chip system, which can include one or more processors that can be used to invoke computer instructions to enable the electronic device to perform the file transmission method in the embodiments of the present application.
[0219] The above-described embodiments are merely used to illustrate the technical solutions of the present application, but not for limiting the present application; even though the foregoing embodiments of the present application are described in detail, those skilled in the art should understand that modifications can be made to the technical solutions recorded in the foregoing embodiments, or some of the technical features can be replaced equivalently; and 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] In the above-described embodiments, according to the context, the term "when" can be interpreted as meaning "if" or "after" or "in response to determining" or "in response to detecting". Similarly, according to the context, the phrase "upon determining" or "if detecting (a stated condition or event)" can be interpreted as meaning "if determining" or "in response to determining" or "upon detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)".
[0221] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented 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, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. 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 one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk) and the like.
[0222] Those of ordinary skill in the art understand that all or part of the processes in the above embodiments can be implemented by a computer program to instruct the relevant hardware, which can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes ROM or random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.
Claims
1. A file transfer method, characterized in that, The method includes: In response to a file sharing operation, the first electronic device determines that a routing device is using a Dynamic Frequency Selection (DFS) channel, and when the first electronic device is indoors, it disables Channel Availability Detection (CAC) and establishes a first communication connection with the second electronic device based on the DFS channel, wherein 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 at a first frequency; The first electronic device sends the file to the second electronic device via the first bandwidth 5G channel through the first communication connection.
2. The method according to claim 1, characterized in that, When the first electronic device determines that a routing device is using the Dynamic Frequency Selection (DFS) channel, and determines that the first electronic device is indoors, the method further includes: The first electronic device disables the wireless local area network (WLAN) service.
3. The method according to claim 2, characterized in that, The first electronic device transmits the file to the second electronic device via a 5G channel with the first bandwidth based on the first communication connection, specifically including: Based on the first communication connection, the first part of the file is sent to the second electronic device through the 5G channel with the first bandwidth; After the WLAN service is turned off, when establishing a first communication connection with the 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 with a second bandwidth; The second part of the file is sent to the second electronic device via the second communication connection through the second bandwidth 2.4G channel; the second part is the part of the file other than the first part.
4. The method according to claim 3, characterized in that, Before the first electronic device shuts down the wireless local area network (WLAN) service, the method further includes: The first electronic device displays a prompt message, which prompts the user to choose whether to disable the WLAN service when transferring the file. An operation to disable the WLAN service was detected.
5. The method according to claim 4, characterized in that, The notification message also includes the time required to transfer the file.
6. The method according to any one of claims 1-5, characterized in that, After establishing a first communication connection with the second electronic device based on the DFS channel, the method further includes: The first electronic device activates the CAC detection.
7. The method according to any one of claims 3-5, characterized in that, The method further includes: In response to a file sharing operation, if the first electronic device determines that no routing device is using the DFS channel, or determines that the first electronic device is not indoors, it establishes a first communication connection with the second electronic device based on a 5G channel with a third bandwidth, and also establishes a second communication connection with the second electronic device based on a 2.4G channel with a second bandwidth; the third bandwidth is less than the first bandwidth. Based on the first communication connection, the third part of the file is sent to the second electronic device through the 5G channel with the third bandwidth, and based on the second communication connection, the fourth part of the file is sent to the second electronic device through the 2.4G channel with the second bandwidth; the fourth part is the part of the file other than the third part.
8. The method according to any one of claims 2-5, characterized in that, After confirming that the file transfer is complete, the first electronic device activates the WLAN service.
9. The method according to any one of claims 3-5, 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-5, characterized in that, The ratio of the size of the first part of the document to the size of the second part of the document 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.
11. The method according to claim 10, characterized in that, The ratio of the size of the first part of the file to the size of the second part of the file is equal to the ratio of the data transmission rate on the first bandwidth 5G channel to the data transmission rate on the second bandwidth 2.4G channel, rounded down.
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 being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform 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 causes the electronic device to perform the method as described in any one of claims 1-11.
14. A chip system applied to an electronic device, characterized in that, The chip system includes one or more processors, which are configured to invoke computer instructions to cause the electronic device to perform 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
System and method for optimizing channel switch mechanism between DFS channels
CN113853001A