Data transmission method and electronic device
By adjusting the working bandwidth in the WiFi connection, the problem of low data transmission rate between different manufacturers' WiFi chip electronic devices has been solved, and the rapid transmission of large files and the improvement of user experience.
Patent Information
- Application Number
- PCT/CN2024/078705
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-26
- Filing Date
- 2024-02-27
- Publication Date
- 2025-01-30
AI Technical Summary
Due to the differences in WiFi chip design and architecture of different manufacturers, the data transmission rate decreases when data transmission between electronic devices equipped with WiFi chips of different manufacturers, resulting in too long large file transfer time.
By establishing a WIFI connection between the first electronic equipment and the second electronic equipment, adjust the work bandwidth, so that the first electronic equipment is used as the first role, and the work bandwidth with the second electronic equipment is adjusted to the second role. One working bandwidth, thereby increasing the data transmission rate.
The data transmission rate between electronic devices of the WiFi chip in different manufacturers has increased, and the transmission time of large files is shortened and the user experience has been improved.
Smart Images

Figure CN2024078705_30012025_PF_FP_ABST
Abstract
Description
Data transmission method and electronic device
[0001] This application claims priority to Chinese patent application No. 202310929990.6, filed on July 26, 2023, entitled “A Data Transmission Method and Electronic Device,” the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of electronic devices, and in particular to a data transmission method and electronic device. Background Art
[0003] WiFi (wireless fidelity) networking connects multiple WiFi devices using wireless local area network (WLAN) technology, enabling communication and resource sharing between them. WiFi networking allows multiple electronic devices to connect to the same wireless LAN, enabling data transfer between them. For example, WiFi networking enables operations such as device cloning, data migration, file sharing, and file transfer between multiple electronic devices.
[0004] In practice, electronic devices can establish a WiFi network with other electronic devices through their own WiFi chips (also known as WiFi modules, wireless network cards, or wireless network adapters). Existing WiFi chips may include WiFi chips developed by different manufacturers, such as WiFi chips from manufacturer A and WiFi chips from manufacturer B.
[0005] However, due to certain differences in the design and architecture of WiFi chips from different manufacturers, the data transmission rate will be reduced when data is transmitted between electronic devices equipped with WiFi chips from different manufacturers, which will cause the transmission time of large files to be too long.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a data transmission method and an electronic device, which can improve the data transmission rate and realize the rapid transmission of large files.
[0008] To achieve the above objectives, the present invention adopts the following technical solutions:
[0009] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a first electronic device. The data transmission method may include: in response to a first operation, the first electronic device obtains first information; wherein the first operation is used to trigger the first electronic device to send the first data to be transmitted to the second electronic device, or to trigger the second electronic device to send the first data to the first electronic device; when the first information meets a preset condition, the first electronic device sends a first notification to the second electronic device in a first role, so that the second electronic device adjusts the working bandwidth of the second electronic device as a second role to the first working bandwidth indicated by the first notification, and the second role is a role that is relative to the first role; the first electronic device adjusts the working bandwidth corresponding to the first electronic device as the first role to the first working bandwidth; the first electronic device transmits the first data to the second electronic device based on the first WiFi connection using the first working bandwidth, wherein the first WiFi connection is a WiFi connection established between the first electronic device as the first role and the second electronic device as the second role.
[0010] Based on the method described in the first aspect, when a first electronic device transmits data with a second electronic device, the first electronic device can obtain first information. If the first information meets a preset condition, the first electronic device can send a first notification to the second electronic device, so that the second electronic device adjusts its working bandwidth as a second role to the first working bandwidth indicated by the first notification. In addition, the first electronic device can also adjust its working bandwidth as a first role to the first working bandwidth, so that the second electronic device and the first electronic device can use a larger first working bandwidth to transmit data, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0011] In combination with the first aspect, in another possible implementation method, the above-mentioned first role is one of the access point, group owner, personal mobile hotspot, virtual access point, and hotspot, and the above-mentioned second role is one of the site or group client; or the above-mentioned first role is one of the site or group client, and the above-mentioned second role is one of the access point, group owner, personal mobile hotspot, virtual access point, and hotspot.
[0012] In combination with the first aspect, in another possible implementation, the first notification includes an extended channel switching notification and an operating mode notification.
[0013] In combination with the first aspect, in another possible implementation method, the above-mentioned first role is a role among access point, group owner, personal mobile hotspot, virtual access point, and hotspot, the above-mentioned second role is a role among site or group client, the above-mentioned first notification is an extended channel switching notification, and the above-mentioned first electronic device sends the first notification to the second electronic device in the first role, which may include: the first electronic device sends the extended channel switching notification to the second electronic device in the first role.
[0014] Based on this possible implementation method, when the first role of the first electronic device is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and when the first information obtained by the first electronic device meets a preset condition, the first electronic device can send an extended channel switching notification to the second electronic device, so that the second electronic device adjusts its working bandwidth as the second role to the first working bandwidth indicated by the extended channel switching notification, and the first electronic device can also adjust its working bandwidth as the first role to the first working bandwidth, so that the second electronic device and the first electronic device can use a larger first working bandwidth to transmit data, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0015] In combination with the first aspect, in another possible implementation, the above-mentioned first information includes the chip type of the WiFi chip configured as the electronic device of the third role or the second working bandwidth for transmitting data between the first electronic device and the second electronic device, wherein the third role is a site or a group client.
[0016] In combination with the first aspect, in another possible implementation, the above-mentioned first information satisfies a preset condition, which may include: the chip type of the WiFi chip configured in the electronic device as the third role is a preset type; or the second working bandwidth is inconsistent with the first working bandwidth.
[0017] Based on this possible implementation method, when the second working bandwidth for transmitting data between the first electronic device and the second electronic device is inconsistent with the first working bandwidth, the first electronic device sends a first notification to the second electronic device to adjust the working bandwidth for transmitting data between the first electronic device and the second electronic device to the larger first working bandwidth. In this way, when the data transmission rate is low, the working bandwidth for transmitting data between the first electronic device and the second electronic device can be adjusted in time, thereby improving the data transmission rate and shortening the data transmission time.
[0018] Furthermore, the solution of the present application can also be such that when the chip type of the WiFi chip configured in the electronic device serving as the third role is a preset type, the first electronic device sends a first notification to the second electronic device to adjust the working bandwidth for transmitting data between the first electronic device and the second electronic device to a larger first working bandwidth, thereby further improving the data transmission rate.
[0019] In combination with the first aspect, in another possible implementation, the above-mentioned first information satisfies the preset condition that the second working bandwidth is inconsistent with the first working bandwidth. In response to the first operation, before the first electronic device obtains the first information, the above-mentioned data transmission method may also include: the first electronic device transmits the first data to the second electronic device based on the first WiFi connection using the second working bandwidth, and the second working bandwidth is smaller than the first working bandwidth; the above-mentioned first electronic device transmits the first data to the second electronic device based on the first WiFi connection using the first working bandwidth, which may include: the first electronic device transmits the second data to the second electronic device based on the first WiFi connection using the first working bandwidth, wherein the second data is the remaining data in the first data except the data transmitted by the second electronic device to the second electronic device using the second working bandwidth.
[0020] Based on this possible implementation method, when the second working bandwidth for transmitting data between the first electronic device and the second electronic device is inconsistent with the first working bandwidth, the first electronic device sends a first notification to the second electronic device to adjust the working bandwidth for transmitting data between the first electronic device and the second electronic device to the larger first working bandwidth. In this way, when the data transmission rate is low, the working bandwidth for transmitting data between the first electronic device and the second electronic device can be adjusted in time, thereby improving the data transmission rate and shortening the data transmission time.
[0021] In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to a first electronic device. The data transmission method may include: when the first electronic device and the second electronic device transmit first data, the first electronic device, as a third role, establishes a first WiFi connection with the second electronic device, which is a fourth role, and the working bandwidth corresponding to the first WiFi connection is the second working bandwidth; wherein, the first data is the data to be transmitted sent by the first electronic device to the second electronic device, or the first data is the data to be transmitted sent by the second electronic device to the first electronic device; when the second working bandwidth is inconsistent with the first working bandwidth, the first electronic device sends a second notification to the second electronic device, and the second notification is used to indicate that the first electronic device will disconnect from the second electronic device and re-establish a WiFi connection; wherein, the first working bandwidth is the working bandwidth negotiated between the first electronic device and the second electronic device, and the first working bandwidth is greater than the second working bandwidth; the first electronic device, as the third role, establishes a second WiFi connection with the second electronic device, which is the fourth role, and the working bandwidth corresponding to the second WiFi connection is the first working bandwidth; based on the second WiFi connection, the first electronic device uses the first working bandwidth to transmit the first data to the second electronic device.
[0022] Based on the method described in the second aspect, when the first electronic device transmits data with the second electronic device, the first electronic device, as a third role, can establish a first WiFi connection with the first electronic device, as a fourth role. Afterwards, when the second working bandwidth corresponding to the first WiFi connection is inconsistent with the first working bandwidth, the first electronic device can send a second notification to the second electronic device to notify the second electronic device that the first electronic device will disconnect from the second electronic device and re-establish the second WiFi connection. Among them, the working bandwidth corresponding to the second WiFi connection is the first working bandwidth, and then the first electronic device and the second electronic device can use the larger first working bandwidth to transmit the first data, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0023] In combination with the second aspect, in another possible implementation method, the above-mentioned first electronic device sends a second notification to the second electronic device, which may include: the first electronic device obtains the data volume corresponding to the first data; when the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device sends the second notification to the second electronic device.
[0024] Based on this possible implementation, when the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device sends a second notification to the second electronic device to notify the second electronic device that the first electronic device will disconnect from the second electronic device and re-establish a second WiFi connection. The operating bandwidth corresponding to the second WiFi connection is the first operating bandwidth, so that the first electronic device and the second electronic device can use the larger first operating bandwidth to transmit the first data, which can improve the data transmission rate, shorten the data transmission time, and achieve rapid transmission of large files.
[0025] In combination with the second aspect, in another possible implementation, the above-mentioned first electronic device, as the third role, establishes a second WiFi connection with the second electronic device, as the fourth role, which may include: the first electronic device sends a first request to the second electronic device; when the first electronic device receives a first response to the first request sent by the second electronic device, the first electronic device, as the third role, establishes a second WiFi connection with the second electronic device, as the fourth role.
[0026] In combination with the second aspect, in another possible implementation, the third role is a site or a group client, and the fourth role is an access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot.
[0027] In a third aspect, an embodiment of the present application provides a data transmission method, which is applied to a first electronic device. The data transmission method may include: the first electronic device receives second information sent by the second electronic device, the second information including identification information corresponding to a fifth role created by the second electronic device and a first working bandwidth; wherein the fifth role is a role created by the second electronic device when receiving the first operation; the first operation is used to trigger the first electronic device to send the first data to be transmitted to the second electronic device, or to trigger the second electronic device to send the first data to the first electronic device; when the first electronic device scans the first access point with the sixth role and the identification information corresponding to the first access point matches the identification information corresponding to the fifth role, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, and the sixth role is a role that is relative to the fifth role; the first electronic device, as the sixth role, establishes a WiFi connection with the second electronic device as the fifth role; based on the WiFi connection, the first electronic device uses the first working bandwidth to transmit the first data to the second electronic device.
[0028] Based on the method described in the third aspect, when a first electronic device transmits first data to a second electronic device, the first electronic device, acting as a sixth role, can set filtering conditions based on the second information sent by the second electronic device, acting as the fifth role. The first electronic device can then adjust its operating bandwidth, acting as the sixth role, to a target operating bandwidth based on the filtering conditions. The first electronic device can then transmit the first data between the first and second electronic devices using the target operating bandwidth, thereby increasing the data transmission rate, shortening the data transmission time, and improving the user experience.
[0029] In combination with the third aspect, in another possible implementation, the first electronic device is configured with a first WiFi chip. Before the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, the data transmission method may further include: the first electronic device obtains the chip type of the first WiFi chip; the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, which may include: when the chip type of the first WiFi chip is a preset type, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth.
[0030] In combination with the third aspect, in another possible implementation, after the first electronic device obtains the chip type of the first WiFi chip, the data transmission method may further include: the first electronic device obtains the data volume corresponding to the first data; the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, which may include: when the chip type of the first WiFi chip is a preset type and the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth.
[0031] Based on this possible implementation method, when the chip type of the first WiFi chip is a preset type and the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, and then the first electronic device and the second electronic device can use the larger first working bandwidth to transmit the first data, which can improve the data transmission rate, shorten the data transmission time, and realize the rapid transmission of large files.
[0032] In combination with the third aspect, in another possible implementation, the fifth role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and the sixth role is one of a site or a group client.
[0033] In a fourth aspect, an embodiment of the present application provides a data transmission method, which is applied to a first electronic device. The data transmission method may include: when the first electronic device and the second electronic device transmit the first data, the first electronic device obtains the working frequency band corresponding to the seventh role created by the second electronic device; wherein the first data is the first electronic device sending data to be transmitted to the second electronic device, or the first data is the second electronic device sending data to be transmitted to the first electronic device; when the working frequency band corresponding to the seventh role is a preset frequency band, the first electronic device adjusts the working bandwidth of the first electronic device as the eighth role to the first working bandwidth; the first electronic device, as the eighth role, establishes a WiFi connection with the second electronic device as the seventh role; based on the WiFi connection, the first electronic device uses the first working bandwidth to transmit the first data to the second electronic device.
[0034] Based on the method described in the fourth aspect, when the first electronic device is a terminal device, the first electronic device does not provide a working bandwidth that can be used to set the supported working bandwidth of the WiFi chip carried by the first electronic device. Therefore, when the first electronic device and the second electronic device transmit the first data, the first electronic device, as the eighth role, can obtain the working frequency band corresponding to the seventh role created by the second electronic device. Thereafter, when the working frequency band corresponding to the seventh role created by the second electronic device is the preset frequency band, the first electronic device can adjust the working bandwidth supported by the WiFi chip carried by it to the maximum working bandwidth corresponding to the preset frequency band (i.e., the first working bandwidth), and then the first electronic device and the second electronic device can use the target working bandwidth to transmit the first data, which can improve the data transmission rate, shorten the data transmission time, and thus improve the user experience.
[0035] In combination with the fourth aspect, in another possible implementation, the above-mentioned first electronic device, as the eighth role, establishes a WiFi connection with the second electronic device, as the seventh role, which may include: the first electronic device, as the eighth role, sends a second request to the second electronic device, and the second request includes a first working bandwidth; the first electronic device receives a second response corresponding to the second request sent by the second electronic device; the above-mentioned first electronic device transmits the first data with the second electronic device based on the WiFi connection using the first working bandwidth, which may include: when the second response indicates that the second electronic device supports the first working bandwidth, the first electronic device transmits the first data with the second electronic device based on the WiFi connection using the first working bandwidth.
[0036] In combination with the fourth aspect, in another possible implementation, after the first electronic device receives the second response corresponding to the second request sent by the second electronic device, the data transmission method may also include: when the second response indicates that the second electronic device does not support the first working bandwidth, the working bandwidth of the first electronic device as the eighth role is adjusted to the third working bandwidth indicated by the second response, and the third working bandwidth is smaller than the first working bandwidth; the first electronic device transmits the first data to the second electronic device based on the WiFi connection using the third working bandwidth.
[0037] In combination with the fourth aspect, in another possible implementation, the third working bandwidth is greater than the fourth working bandwidth, wherein the fourth working bandwidth is the working bandwidth set for the seventh role when the second electronic device creates the seventh role.
[0038] In combination with the fourth aspect, in another possible implementation method, the above-mentioned first electronic device obtains the working frequency band corresponding to the seventh role created by the second electronic device, which may include: the first electronic device obtains the data volume corresponding to the first data; when the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device obtains the working frequency band corresponding to the seventh role created by the second electronic device.
[0039] In combination with the fourth aspect, in another possible implementation, the seventh role is one of access point, group owner, personal mobile hotspot, virtual access point, and hotspot, and the eighth role is one of site or group client.
[0040] In a fifth aspect, an embodiment of the present application provides a data transmission device that can be applied to an electronic device to implement the method described in the first aspect. The functions of the data transmission device can be implemented in hardware or by executing corresponding software in hardware. The hardware or software includes one or more modules corresponding to the above functions, such as an acquisition module, a sending module, and an adjustment module.
[0041] Among them, the acquisition module can be used to obtain first information in response to a first operation; wherein the first operation is used to trigger the first electronic device to send first data to be transmitted to the second electronic device, or to trigger the second electronic device to send first data to the first electronic device.
[0042] The sending module can be used to send a first notification to the second electronic device in a first role when the first information meets the preset conditions, so that the second electronic device adjusts the working bandwidth of the second electronic device as the second role to the first working bandwidth indicated by the first notification, and the second role is a role that is relative to the first role.
[0043] The adjustment module may be configured to adjust the working bandwidth corresponding to the first electronic device serving as the first role to the first working bandwidth.
[0044] The sending module can also be used to transmit first data to the second electronic device based on the first WiFi connection using the first working bandwidth, wherein the first WiFi connection is a WiFi connection established between the first electronic device as the first role and the second electronic device as the second role.
[0045] In a sixth aspect, an electronic device is provided, wherein the electronic device has the function of implementing the method described in the first, second, third, or fourth aspects above. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0046] In the seventh aspect, an electronic device is provided, comprising: a processor and a memory; the memory is used to store computer-executable instructions, and when the electronic device is running, the processor executes the computer-executable instructions stored in the memory to enable the electronic device to execute the data transmission method as described in any one of the first aspect above, or, execute the data transmission method as described in any one of the second aspect above, or, execute the data transmission method as described in any one of the third aspect above, or, execute the data transmission method as described in any one of the fourth aspect above.
[0047] In an eighth aspect, an electronic device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute the data transmission method as described in any one of the first aspects above according to the instructions; or, the processor is used to execute the data transmission method as described in any one of the second aspects above according to the instructions; or, the processor is used to execute the data transmission method as described in any one of the third aspects above according to the instructions; or, the processor is used to execute the data transmission method as described in any one of the fourth aspects above according to the instructions.
[0048] In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by an electronic device, the electronic device implements the data transmission method as described in any one of the first aspect or possible implementations of the first aspect; or, when the computer program instructions are executed by the electronic device, the electronic device implements the data transmission method as described in any one of the second aspect or possible implementations of the second aspect; or, when the computer program instructions are executed by the electronic device, the electronic device implements the data transmission method as described in any one of the third aspect or possible implementations of the third aspect; or, when the computer program instructions are executed by the electronic device, the electronic device implements the data transmission method as described in any one of the fourth aspect or possible implementations of the fourth aspect.
[0049] In the tenth aspect, an embodiment of the present application provides a computer program product, comprising a computer-readable code, which, when the computer-readable code is run in an electronic device, enables the electronic device to implement a data transmission method as described in any one of the first aspect or the possible implementations of the first aspect; or, when the computer-readable code is run in an electronic device, enables the electronic device to implement a data transmission method as described in any one of the second aspect or the possible implementations of the second aspect; or, when the computer-readable code is run in an electronic device, enables the electronic device to implement a data transmission method as described in any one of the third aspect or the possible implementations of the third aspect; or, when the computer-readable code is run in an electronic device, enables the electronic device to implement a data transmission method as described in any one of the fourth aspect or the possible implementations of the fourth aspect.
[0050] In an eleventh aspect, a device (for example, a chip system) is provided, which includes a processor for supporting an electronic device to implement the functions involved in the first, second, third, or fourth aspects above. In one possible design, the device also includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, it can be composed of a chip or include a chip and other discrete devices.
[0051] It should be understood that the beneficial effects of the above-mentioned fifth to eleventh aspects can be found in the relevant descriptions in the above-mentioned first, second, third or fourth aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] FIG1 is a schematic diagram of a flow chart of data transmission by an electronic device in the prior art;
[0053] FIG2 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0054] FIG3 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;
[0055] FIG4 is a first schematic diagram of a scenario of a data transmission method provided in an embodiment of the present application;
[0056] FIG5 is a flowchart of a data transmission method according to an embodiment of the present application;
[0057] FIG6 is a second schematic diagram of a scenario of a data transmission method provided in an embodiment of the present application;
[0058] FIG7 is a second flow chart of a data transmission method provided in an embodiment of the present application;
[0059] FIG8 is a third flow chart of a data transmission method provided in an embodiment of the present application;
[0060] FIG9 is a fourth flow chart of a data transmission method provided in an embodiment of the present application;
[0061] FIG10 is a schematic diagram of an extended channel switching notification provided in an embodiment of the present application;
[0062] FIG11 is a schematic diagram of a working mode notification provided in an embodiment of the present application;
[0063] FIG12 is a fifth flow chart of a data transmission method provided in an embodiment of the present application;
[0064] FIG13 is a sixth flow chart of a data transmission method provided in an embodiment of the present application;
[0065] FIG14 is a seventh flow chart of a data transmission method provided in an embodiment of the present application;
[0066] FIG15 is a flowchart of a data transmission method according to an embodiment of the present application;
[0067] FIG16 is a ninth flowchart of a data transmission method according to an embodiment of the present application;
[0068] FIG17 is a flowchart diagram 10 of a data transmission method provided in an embodiment of the present application;
[0069] FIG18 is a flowchart diagram 11 of a data transmission method provided in an embodiment of the present application;
[0070] FIG19 is a first structural diagram of a data transmission device provided in an embodiment of the present application;
[0071] FIG20 is a second structural diagram of a data transmission device provided in an embodiment of the present application;
[0072] FIG21 is a third structural diagram of a data transmission device provided in an embodiment of the present application;
[0073] Figure 22 is a fourth structural diagram of a data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0075] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. Throughout this application, unless otherwise specified, "plurality" means two or more.
[0076] In order to clearly describe the technical solutions of the embodiments of the present application, some of the terms and technologies involved in the embodiments of the present application are briefly introduced below.
[0077] WiFi networking connects multiple WiFi devices using wireless local area network (WLAN) technology, enabling communication and resource sharing between them. WiFi networking allows multiple electronic devices to connect to the same wireless LAN, enabling data transfer between them. For example, WiFi networking enables operations such as device cloning, data migration, file sharing, and file transfer between multiple devices.
[0078] Typically, when multiple electronic devices are connected to a WiFi network, one of the electronic devices can serve as an access point (AP), and the other electronic devices can serve as stations (STA). The electronic device serving as a station can access the electronic device serving as an access point, that is, multiple electronic devices serving as stations can be connected to the same wireless local area network through the electronic device serving as an access point, thereby achieving mutual connection and data transmission between multiple electronic devices.
[0079] In practice, electronic devices can establish a WiFi network with other electronic devices through their own WiFi chips (also known as WiFi modules, wireless network cards, or wireless network adapters). Existing WiFi chips may include WiFi chips developed by different manufacturers, such as a WiFi chip from manufacturer A and a WiFi chip from manufacturer B. However, the design and architecture of WiFi chips from different manufacturers vary, which can lead to compatibility issues when electronic devices equipped with WiFi chips from different manufacturers establish a WiFi network.
[0080] Specifically, due to certain differences in the design and architecture of the WiFi chips of manufacturer A and manufacturer B, when an electronic device equipped with the WiFi chip of manufacturer A transmits data to an electronic device equipped with the WiFi chip of manufacturer B, only the smaller bandwidth initially declared by the electronic device equipped with the WiFi chip of manufacturer A can be used to transmit data, and the larger bandwidth negotiated by both parties cannot be used to transmit data. This will result in a lower data transmission rate, and in turn, longer transmission time for large files.
[0081] For example, taking electronic device A equipped with a WiFi chip from manufacturer A and electronic device B equipped with a WiFi chip from manufacturer B as an example, as shown in FIG1 , when electronic device A, as a station, is not connected to an access point or is connected to an access point in the 2.4 GHz frequency band, when electronic device A creates an access point, in order to avoid interference with other basic service sets (BSSs) by the electronic device using adjacent secondary channels, electronic device A declares support for a smaller bandwidth (e.g., 20 MHz). That is, electronic device A, as an access point, sends a beacon frame carrying the supported bandwidth value (e.g., 20 MHz) to electronic device B. When electronic device B, as a station, receives the beacon frame sent by electronic device A, as an access point (i.e., electronic device B, as a station, scans the access point created by electronic device A), electronic device B, as a station, can determine that electronic device A, as an access point, supports a smaller bandwidth (e.g., 20 MHz). Afterwards, because electronic device B can support a larger bandwidth (e.g., 80 MHz), when electronic device B associates with the access point created by electronic device A, electronic device B, as a station, can send an association request frame to electronic device A, as an access point. This association request frame carries the supported bandwidth value (e.g., 80 MHz). After electronic device A, as an access point, receives the association request frame sent by electronic device B, it expands its supported smaller bandwidth (e.g., 20 MHz) to a larger bandwidth (e.g., 80 MHz) and declares support for the larger bandwidth (e.g., 80 MHz). After expanding its supported smaller bandwidth (e.g., 20 MHz) to a larger bandwidth (e.g., 80 MHz), electronic device A, as an access point, can return an association response frame to electronic device B, as a station. This association response frame carries the expanded bandwidth value (e.g., 80 MHz). That is, when electronic device B, as a station, associates with electronic device A, as an access point, both electronic devices B and A negotiate a larger bandwidth (e.g., 80 MHz). After electronic device B and electronic device A negotiate bandwidth, data transmission can be performed between electronic device A as an access point and electronic device B as a station.
[0082] However, since the WiFi chip used by electronic device B is a WiFi chip from manufacturer B, and when electronic device B scans electronic device A, electronic device B finds that electronic device A supports a smaller bandwidth (such as 20MHz), at this time, electronic device B writes the smaller bandwidth supported by electronic device A (such as 20MHz) into the firmware of the WiFi chip from manufacturer B carried by electronic device B. Therefore, when electronic device A and electronic device B are transmitting data, although electronic device A and electronic device B have negotiated a larger bandwidth (such as 80MHz), electronic device A and electronic device B can only use the smaller bandwidth (such as 20MHz) initially claimed by electronic device A to transmit data, and cannot use the negotiated larger bandwidth (such as 80MHz) to transmit data, resulting in a longer data transmission time. For example, when electronic device A sends data to electronic device B, electronic device A fails to send data using a bandwidth of 80MHz, then electronic device A fails to send data using a bandwidth of 40MHz, and finally electronic device A successfully sends data using a bandwidth of 20MHz.
[0083] To summarize, in the prior art, when an electronic device equipped with a WiFi chip from manufacturer A acts as a site and is not connected to an access point in the 5GHz band, when an electronic device equipped with a WiFi chip from manufacturer B transmits data with an electronic device equipped with a WiFi chip from manufacturer A, only the smaller bandwidth initially declared by the electronic device equipped with the WiFi chip from manufacturer A can be used to transmit data, and the larger bandwidth negotiated by both parties cannot be used to transmit data. This results in a lower data transmission rate, which in turn causes the transmission time of large files to become longer, affecting the user experience.
[0084] In response to the above problems, an embodiment of the present application provides a data transmission method, which can be applied to electronic devices. When a first electronic device transmits target data with a second electronic device, the first electronic device, as a site (or group client), can set filtering conditions based on the information of the target hotspot created by the second electronic device as a target hotspot (i.e., an access point or group owner). Afterwards, the first electronic device can adjust the working bandwidth of the first electronic device as a site (or group client) to the target working bandwidth based on the filtering conditions, and then the target working bandwidth can be used to transmit the target data between the first electronic device and the second electronic device, thereby improving the data transmission rate and shortening the data transmission time, thereby realizing the rapid transmission of large files and improving the user experience.
[0085] Furthermore, when the first electronic device is a terminal device, the first electronic device does not provide a working bandwidth that can be used to set the WiFi chip carried by the first electronic device. Therefore, when the first electronic device and the second electronic device transmit target data, the first electronic device, as a site (or group client), can obtain the working frequency band corresponding to the target hotspot (i.e., access point or group owner) created by the second electronic device. Afterwards, when the working frequency band corresponding to the access point (or group owner) created by the second electronic device is the target frequency band, the first electronic device can adjust the working bandwidth supported by the WiFi chip it carries to the maximum working bandwidth corresponding to the target frequency band (i.e., target working bandwidth), and then the target working bandwidth can be used to transmit target data between the first electronic device and the second electronic device, thereby improving the data transmission rate, shortening the data transmission time, and realizing the rapid transmission of large files, thereby improving the user experience.
[0086] In addition, when the first electronic device and the second electronic device transmit target data, the first electronic device, as a site (or group client), can establish a WiFi connection with the second electronic device as a target hotspot (i.e., an access point or group owner). Afterwards, when the working bandwidth corresponding to the WiFi connection is inconsistent with the target working bandwidth, the first electronic device can send a reconnection notification to the second electronic device to notify the second electronic device that the first electronic device will disconnect from the second electronic device and re-establish the WiFi connection. Afterwards, the first electronic device and the second electronic device re-establish a WiFi connection, wherein the working bandwidth corresponding to the re-established WiFi connection is the target working bandwidth, and then the target working bandwidth can be used to transmit the target data between the first electronic device and the second electronic device, thereby improving the data transmission rate, shortening the data transmission time, and thus realizing the rapid transmission of large files, thereby improving the user experience.
[0087] In addition, when the first electronic device and the second electronic device transmit target data, if the working bandwidth for transmitting data between the first electronic device and the second electronic device is inconsistent with the target working bandwidth (that is, the first electronic device and the second electronic device cannot use the negotiated larger working bandwidth to transmit data), the first electronic device can send a management frame notification to the second electronic device to adjust the working bandwidth corresponding to the WiFi connection established between the first electronic device and the second electronic device to the target working bandwidth indicated by the management frame notification, and then the target working bandwidth can be used to transmit target data between the first electronic device and the second electronic device, thereby improving the data transmission rate, shortening the data transmission time, and realizing the rapid transmission of large files, thereby improving the user experience.
[0088] The data transmission method provided in the embodiment of the present application can be applied to an electronic device, which can be the first electronic device mentioned above or the second electronic device mentioned above.
[0089] In some embodiments, the electronic device may be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), a cellular phone, a personal digital assistant (PDA), a wearable device, or other electronic device. The embodiments of the present application do not limit the specific form of the electronic device.
[0090] That is, the first electronic device or the second electronic device may be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), a cellular phone, a personal digital assistant (PDA), a wearable device, or other electronic device. Furthermore, the specific form of the first electronic device may be the same as or different from the specific form of the second electronic device.
[0091] For example, when the first electronic device is a personal computer (such as a laptop or a desktop computer equipped with a wireless network card), the second electronic device may be a personal computer, a tablet computer, a mobile phone, etc.
[0092] For example, taking the electronic device (ie, the first electronic device or the second electronic device) as a mobile phone as an example, FIG2 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0093] As shown in Figure 2, the electronic device may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc. Among them, the sensor module 280 can include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.
[0094] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0095] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (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). Different processing units may be independent devices or integrated into one or more processors.
[0096] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0097] Processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 210 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 210. If processor 210 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 210 latency, and thus improves system efficiency.
[0098] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0099] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 210 and the wireless communication module 260. For example, the processor 210 communicates with the Bluetooth module in the wireless communication module 260 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0100] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.
[0101] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor and baseband processor.
[0102] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0103] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to electronic devices. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the same device as at least some of the modules of the processor 210.
[0104] The wireless communication module 260 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 260 can be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0105] In an embodiment of the present application, the wireless communication module 260 may include a Bluetooth module and a WiFi module (or referred to as a WiFi chip, a wireless network card, or a wireless network adapter). For example, the WiFi module may include two WiFi network interfaces, namely a first WiFi network interface and a second WiFi network interface. The electronic device 200 may serve as a station and connect to an access point via the first WiFi network interface of the WiFi module. The electronic device 200 may also serve as an access point and establish a wireless communication connection with a station via the second WiFi network interface of the WiFi module.
[0106] The above-mentioned WiFi module can support multiple working modes, such as single-frequency single-transmit, dual-frequency single-transmit and dual-frequency dual-transmit working modes. Among them, in the dual-frequency dual-transmit working mode, the electronic device 200 can support two working frequency bands and can use the two working frequency bands simultaneously for WiFi connection, that is, the electronic device 200 can use the two working frequency bands simultaneously for WiFi communication. Among them, the working frequency band of the WiFi module can be 2.4GHz, 5GHz, 6GHz, etc. For example, the working frequency band of the first WiFi network interface of the WiFi module is 2.4GHz, and the working frequency band of the second WiFi network interface of the WiFi module is 5GHz. For another example, the working frequency band of the first WiFi network interface of the WiFi module is 5GHz, and the working frequency band of the second WiFi network interface of the WiFi module is 2.4GHz.
[0107] It should be noted that one operating frequency band corresponds to multiple operating bandwidths. Specifically, when an electronic device transmits data based on a WiFi connection, it will select a target operating bandwidth from multiple operating bandwidths corresponding to the current operating frequency band based on the actual situation and the current operating frequency band. Afterwards, the electronic device transmits data at the target operating bandwidth under the operating frequency band. Different operating frequency bands correspond to different operating bandwidths, that is, different operating frequency bands correspond to different maximum operating bandwidths. For example, the maximum operating bandwidth corresponding to the 2.4GHz operating frequency band is 20Mhz. For another example, the maximum operating bandwidth corresponding to the 5GHz operating frequency band is 80Mhz or 160Mhz.
[0108] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 250, and antenna 2 is coupled to wireless communication module 260, so that the electronic device can communicate with a network and other devices via wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology.
[0109] The electronic device implements display functionality through a GPU, display screen 294, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs that execute program instructions to generate or modify display information.
[0110] Display screen 294 is used to display images, videos, and the like. Display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device can include one or N display screens 294, where N is a positive integer greater than one.
[0111] The electronic device can implement the shooting function through the ISP, camera 293, video codec, GPU, display 294 and application processor, etc. In some embodiments, the electronic device can include 1 or N cameras 293, where N is a positive integer greater than 1.
[0112] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 via the external memory interface 220 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0113] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a picture playback function, etc.), etc. The data storage area can store data established during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0114] Of course, it is understood that FIG2 is merely an example of an electronic device in the form of a mobile phone. If the electronic device is a tablet computer, handheld computer, PC, PDA, wearable device (e.g., smart watch, smart bracelet), or other device form factors, the structure of the electronic device may include fewer or more structures than shown in FIG2, and this is not limited here.
[0115] It is understandable that, generally speaking, the realization of electronic device functions requires not only hardware support but also software cooperation.
[0116] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device.
[0117] FIG3 is a block diagram of the software structure of the electronic device provided in an embodiment of the present application.
[0118] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries (also called the native layer), and the kernel layer.
[0119] The application layer includes a series of application packages. As shown in Figure 3, these packages may include applications such as camera, gallery (also called photo album), calendar, phone, map, navigation, WLAN, Bluetooth, music, video, and short messaging. The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.
[0120] As shown in FIG3 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
[0121] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.
[0122] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, pictures, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0123] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0124] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).
[0125] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0126] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.
[0127] The Android runtime includes core libraries and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0128] The core library consists of two parts: one is the function that the Java language needs to call, and the other is The core library.
[0129] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0130] The system library can include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).
[0131] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional and three-dimensional layers for multiple applications.
[0132] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files, etc. The media library can support multiple audio and video encoding formats.
[0133] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0134] A 2D graphics engine is a drawing engine for 2D drawings.
[0135] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.
[0136] The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure or software structure.
[0137] The hardware structure and software structure of the electronic device according to the embodiment of the present application are introduced above. Before introducing the data transmission method provided by the embodiment of the present application, the technology involved in the data transmission method provided by the embodiment of the present application will be introduced first.
[0138] (1) Access points and sites
[0139] When multiple electronic devices are connected to a Wi-Fi network, one of them can function as an access point (AP), while the others can function as stations (STAs). The station-based electronic device can access the access point-based electronic device. This means that multiple stations can connect to the same wireless local area network (WLAN) through the access point-based electronic device, enabling interconnection and data transmission between the multiple electronic devices. These electronic devices can be personal computers (such as laptops or desktop computers equipped with wireless network cards), tablets, mobile phones, and the like.
[0140] That is to say, when two electronic devices communicate via WiFi, one of the electronic devices can serve as an access point (i.e., AP) and the other electronic device can serve as a station (i.e., STA). The electronic device serving as the station can access the electronic device serving as the access point, that is, the electronic device serving as the station establishes a WiFi connection with the electronic device serving as the access point, and data can be transmitted between the electronic device serving as the station and the electronic device serving as the access point.
[0141] For example, taking the electronic device as a laptop computer, as shown in (a) in Figure 4, laptop computer A can be used as an access point, laptop computer B can be used as a station, and laptop computer B can be connected to laptop computer A, that is, a wireless communication connection can be established between laptop computer A and laptop computer B, and data can be transmitted between laptop computer A and laptop computer B.
[0142] For another example, taking one electronic device as a laptop and the other electronic device as a mobile phone, as shown in (b) of Figure 4, laptop C can serve as an access point and mobile phone D can serve as a station. Mobile phone D can access laptop C, that is, a wireless communication connection can be established between laptop C and mobile phone D, and data can be transmitted between laptop C and mobile phone D.
[0143] It should be noted that the above access point may be a traditional access point (ie, Legacy AP).
[0144] (2) WiFi peer-to-peer (P2P) connection
[0145] WiFi point-to-point connection is a technical specification launched by the WiFi Alliance, also known as WiFi direct connection (i.e. WiFi Direct). WiFi point-to-point connection can support two or more electronic devices to form a point-to-point network (i.e. P2P Group) and communicate with each other without an access point (i.e. AP). The point-to-point network can include a group owner (i.e. group owner, GO) and at least one group client (i.e. group client, GC). It can be understood that the group owner can serve as an access point in the point-to-point network, that is, the group owner is equivalent to the above-mentioned access point. The group client can serve as a site in the point-to-point network, that is, the group client is equivalent to the above-mentioned site.
[0146] WiFi point-to-point connections can also be used for data transmission between electronic devices. For example, in the case of data transmission between a laptop and a mobile phone, the mobile phone can establish a WiFi connection with the laptop through a WiFi point-to-point connection. This means that the mobile phone, as a group client, can connect to the laptop, as the group owner, and data can then be transmitted between the laptop and the mobile phone. Another example is data transmission between a smart TV and a mobile phone. The mobile phone can establish a WiFi connection with the smart TV through a WiFi point-to-point connection, and the mobile phone can then send its display content to the smart TV for display.
[0147] (3) Virtual access point (Soft AP)
[0148] A virtual access point (VAP), also known as a virtual hotspot or simulated hotspot, can be implemented as a virtual access point by using an onboard WiFi chip (also known as a WiFi module, wireless network card, or wireless network adapter) to enable wireless networking. In practice, one electronic device can create a VAP using its WiFi chip. Other electronic devices can then connect to this VAP as stations, enabling WiFi connectivity between them.
[0149] In the embodiments of the present application, an electronic device can function as both an access point and a station. That is, the electronic device can function as a station, connecting to an access point via a WiFi network interface of a WiFi chip to establish a WiFi connection. Simultaneously, the electronic device can also function as an access point, connecting to a station via another WiFi network interface of the WiFi chip to establish another WiFi connection.
[0150] It should be noted that, for two electronic devices establishing a WiFi connection, the role of one electronic device is an access point, and the role of the other electronic device is a site. That is, one of the two electronic devices establishing a WiFi connection can serve as a traditional access point (i.e., Legacy AP), a group owner (i.e., GO), a personal mobile hotspot (i.e., Personal Mobile Hotspot), a virtual access point (i.e., SoftAP) or a hotspot (i.e., HotSpot), and the other electronic device can serve as a site (i.e., STA), a group client (i.e., GC), etc. For example, one electronic device serves as a traditional access point (i.e., Legacy AP) and the other electronic device serves as a site (i.e., STA). For another example, one electronic device serves as a group owner (i.e., GO) and the other electronic device serves as a group client (i.e., GC). For another example, one electronic device serves as a traditional access point (i.e., Legacy AP) and the other electronic device serves as a group client (i.e., GC). For another example, one electronic device serves as a group owner (i.e., GO) and the other electronic device serves as a site (i.e., STA).
[0151] The above describes the technology involved in the data transmission method provided by the embodiment of the present application. The following describes the process of establishing a WiFi connection between electronic devices. The process of establishing a WiFi connection between electronic devices may include four stages: scanning, authentication, association, and four-way handshake.
[0152] Taking the establishment of a WiFi connection between a first computer and a second computer as an example, as shown in FIG5 , the process of establishing a WiFi connection between a second computer and a second computer may specifically include: S501 - S511 .
[0153] S501: The first computer sends a beacon frame to the second computer, where the beacon frame includes an initial working bandwidth corresponding to a target hotspot.
[0154] When a first computer creates a target hotspot (e.g., an access point, a group owner, a personal mobile hotspot, or a virtual access point), the first computer serving as the target hotspot (i.e., the first computer providing the WiFi hotspot function) may send a beacon frame to a second computer. The first computer periodically broadcasts the beacon frame, enabling the second computer to establish a WiFi connection with the first computer. The beacon frame may include an initial operating bandwidth, which may be the operating bandwidth corresponding to the target hotspot set when the first computer creates the target hotspot.
[0155] S502: The second computer receives a beacon frame sent by the first computer.
[0156] After the first computer sends a beacon frame to the second computer, the second computer can receive the beacon frame sent by the first computer, that is, the second computer scans the target hotspot created by the first computer, and the scanning phase is completed.
[0157] In some examples, when a first computer creates a target hotspot, a second computer may also send a probe request frame to the first computer. After receiving the probe request frame sent by the second computer, the first computer may send a probe response frame to the second computer. In other words, when a first computer creates a target hotspot, the second computer may scan the target hotspot created by the first computer through the beacon frame broadcast by the first computer. The second computer may also scan the target hotspot created by the first computer by sending a probe request frame to the first computer.
[0158] S503: The second computer sends an authentication request frame to the first computer.
[0159] S504: The first computer receives the authentication request frame sent by the second computer, and sends an authentication response frame in response to the authentication request frame to the second computer.
[0160] After the second computer scans the target hotspot created by the first computer, the second computer can send an authentication request frame to the first computer. When the first computer receives the authentication request frame sent by the second computer, the first computer can send an authentication response frame to the second computer in response to the authentication request frame, thereby completing the authentication phase.
[0161] S505 : The second computer receives the authentication response frame sent by the first computer, and sends an association request frame to the first computer, where the association request frame includes the target working bandwidth.
[0162] After the second computer receives the authentication response frame sent by the first computer, the second computer may send an association request frame to the first computer to request access to the target hotspot created by the first computer.
[0163] Additionally, when the second computer associates with the target hotspot created by the first computer, the second computer can negotiate an operating bandwidth with the first computer. For example, the association request frame can include the target operating bandwidth (e.g., 80 MHz or 160 MHz). By sending an association request frame carrying the target operating bandwidth to the first computer, the second computer can notify the first computer that the operating bandwidth of the target hotspot needs to be expanded to the target operating bandwidth.
[0164] S506: The first computer receives the association request frame sent by the second computer, and sends an association response frame in response to the association request frame to the second computer.
[0165] When the first computer receives an association request frame carrying the target working bandwidth sent by the second computer, the first computer can expand the working bandwidth corresponding to the target hotspot from the initial working bandwidth (such as 20MHz) to the target working bandwidth (such as 80MHz or 160MHz), that is, when the first computer serves as the target hotspot (such as an access point, a group owner, a personal mobile hotspot, a virtual access point), the working bandwidth supported by the first computer is expanded to the target working bandwidth. After the first computer expands the working bandwidth corresponding to the target hotspot from the initial working bandwidth to the target working bandwidth, the first computer can send an association response frame to the second computer in response to the association request frame. The association response frame can include the expanded working bandwidth (i.e., the target working bandwidth), thus completing the association phase.
[0166] S507: The first computer sends a first key information frame to the second computer.
[0167] After the first computer sends an association response frame to the second computer, the first computer may send a first key information frame carrying a random number generated by the target hotspot (ie, ap number once, ANonce) to the second computer, thereby completing the first handshake (ie, M1).
[0168] S508: The second computer receives the first key information frame sent by the first computer, and sends a second key information frame to the first computer.
[0169] After the second computer receives the first key information frame sent by the first computer, the second computer can send a second key information frame to the first computer, carrying a random number (i.e., station number once, SNonce) generated by the site (or group client) and a message integrity code (i.e., message integrity code, MIC), thereby completing the second handshake (i.e., M2).
[0170] S509: The first computer receives the second key information frame sent by the second computer, and sends a third key information frame to the second computer.
[0171] After the first computer receives the second key information frame sent by the second computer, the first computer can send a third key information frame carrying an encrypted group transient key (GTK) and a message integrity check code to the second computer, thus completing the third handshake (i.e., M3).
[0172] S510: The second computer receives the third key information frame sent by the first computer, and sends a fourth key information frame to the first computer, where the fourth key information frame includes a message integrity check code.
[0173] After the second computer receives the third key information frame sent by the first computer, the second computer can send a fourth key information frame carrying a message integrity check code to the first computer, completing the fourth handshake (ie, M4), that is, completing the four-way handshake stage.
[0174] That is to say, after the second computer and the first computer perform the four stages of scanning, authentication, association, and four-way handshake, the second computer establishes a WiFi connection with the first computer, and then data transmission can be carried out between the first computer and the second computer.
[0175] It should be noted that, on the one hand, an electronic device (such as the first computer) can act as an access point (or group owner) to establish a WiFi connection with other electronic devices (such as the second computer) that act as sites (or group clients). At the same time, the electronic device can also act as a site (or group client) to establish another WiFi connection with other electronic devices that act as access points (or group owners). In other words, an electronic device can establish two WiFi connections. In addition, there are multiple operating frequency bands corresponding to the WiFi connections established between an electronic device and other electronic devices, such as 2.4GHz, 5GHz, and 6GHz. The maximum operating bandwidths corresponding to different operating frequency bands are different. For example, the maximum operating bandwidth corresponding to the 2.4GHz operating frequency band is 20MHz. For example, the maximum operating bandwidth corresponding to the 5GHz operating frequency band is 80MHz or 160MHz. In other words, the operating frequency bands corresponding to the above two WiFi connections may be different, and the maximum operating bandwidths supported by the above two WiFi connections may also be different. For example, if the operating frequency band corresponding to one of the two WiFi connections mentioned above is 2.4 GHz, the maximum operating bandwidth supported by the WiFi connection is 20 MHz; if the operating frequency band corresponding to the other WiFi connection mentioned above is 5 GHz, the maximum operating bandwidth supported by the WiFi connection is 80 MHz or 160 MHz.
[0176] On the other hand, electronic devices can establish WiFi connections with other electronic devices (i.e., WiFi networking) through their own WiFi chips. Among them, existing WiFi chips mainly include WiFi chips developed by different manufacturers, such as WiFi chips from manufacturer A and WiFi chips from manufacturer B.
[0177] In actual implementation, when an electronic device (such as a first computer) equipped with a WiFi chip from manufacturer A acts as a site and does not connect to an access point in the 5GHz working frequency band (that is, the electronic device is not connected to an access point when acting as a site, or the electronic device is connected to an access point in the 2.4GHz working frequency band when acting as a site), when the electronic device (such as the first computer) acts as an access point, in order to avoid the electronic device using adjacent secondary channels and causing interference to other basic service sets, the electronic device sets a smaller initial working bandwidth (such as 20MHz) for the access point (that is, the target hotspot).
[0178] However, when an electronic device equipped with a WiFi chip from manufacturer B (such as a second computer) transmits data with an electronic device equipped with a WiFi chip from manufacturer A (such as a first computer), due to certain differences in the design and architecture of the WiFi chip from manufacturer A and the WiFi chip from manufacturer B, data can only be transmitted using the smaller initial working bandwidth (such as 20MHz) initially declared by the electronic device equipped with the WiFi chip from manufacturer A, and cannot be transmitted using the larger target working bandwidth (80MHz or 160MHz) negotiated by both parties. This will result in a lower data transmission rate, and in turn, a longer time to transmit large files.
[0179] The following is a schematic illustration of the data transmission method provided in the embodiment of the present application based on the process of establishing a WiFi connection between electronic devices and in conjunction with the accompanying drawings.
[0180] In some embodiments, when a first electronic device transmits target data to a second electronic device, the first electronic device, acting as a site (or group client), can set filtering conditions based on information about a target hotspot created by the second electronic device, acting as a target hotspot (i.e., an access point or group owner). The first electronic device can then adjust the operating bandwidth of the first electronic device, acting as a site (or group client), to the target operating bandwidth based on the filtering conditions, so that the target data can be transmitted between the first electronic device and the second electronic device using the target operating bandwidth.
[0181] Taking the first electronic device as the second computer equipped with a WiFi chip of manufacturer B and the second electronic device as the first computer equipped with a WiFi chip of manufacturer A as an example, as shown in FIG6 , the data transmission method provided in the embodiment of the present application may include: S601 - S616.
[0182] S601: The first computer receives a data transmission operation.
[0183] A data transfer operation can be used to trigger the transfer of target data between a first computer and a second computer. The data transfer operation can be user-input. For example, when the first computer, as an access point or group owner, needs to transfer target data to a second computer, as a site or group client, the first computer can receive the data transfer operation input by the user. The data transfer operation can also be sent by the second computer, as a site or group client. For example, when the second computer, as a site or group client, needs to transfer target data to the first computer, as an access point or group owner, the second computer can receive the data transfer operation input by the user, and in response, the second computer can send the data transfer operation to the first computer.
[0184] Exemplarily, the data transmission operation may be used to trigger the electronic device to perform a device cloning operation, may be used to trigger the electronic device to perform a data migration operation, and may be used to trigger the electronic device to perform a file sharing operation.
[0185] For example, taking the example of a data transfer operation being used to trigger a first computer to perform a device-swap cloning operation, as shown in FIG7(a), a device-swap cloning control 02 is displayed on the first computer 01. In response to a user triggering operation (e.g., clicking) on the device-swap cloning control 02, as shown in FIG7(b), the first computer 01 displays a device selection interface 03, which may include identifiers of available devices (e.g., the second computer is identified as device B). In response to a user triggering operation (e.g., clicking) on the identifier of the second computer (i.e., device B), indicating that the first computer needs to transfer cloned files to the second computer based on a WiFi connection, the first computer 01 may create a target hotspot in response to the user triggering operation on the identifier of the second computer, so that the second computer can establish a WiFi connection with the first computer via the target hotspot, thereby enabling the first computer to perform a device-swap cloning operation with the second computer.
[0186] For example, taking the example of a data transfer operation being used to trigger a first computer to perform a data migration operation, the first computer can display multiple data (such as pictures, videos, audio, etc.). The first computer can receive a user selection operation (such as a click operation) on the data displayed on the first computer. In response to the user's selection operation on the data displayed on the first computer, the first computer determines the data selected by the user as the target data. Afterwards, the first computer can receive a user trigger operation (such as a click operation) on a data migration control. In response to the user trigger operation on the data migration control, the first computer can display the identifier of at least one available device (such as a device name). Afterwards, the first computer can receive a user selection operation on the identifier corresponding to the second computer among the identifiers of the at least one available device, indicating that the first computer needs to transfer the target data to the second computer based on a WiFi connection. In response to the user's selection operation on the identifier corresponding to the second computer, the first computer can create a target hotspot so that the second computer can establish a WiFi connection with the first computer through the target hotspot, and then the first computer can migrate the selected target data to the second computer.
[0187] For another example, taking the data transmission operation as an example of triggering the first computer to share files, the first computer can display multiple files. The first computer can receive the user's selection operation (such as a click operation) on the file displayed on the first computer. In response to the user's selection operation on the file displayed on the first computer, the first computer determines the file selected by the user as the target file. Afterwards, the first computer can receive the user's trigger operation (such as a click operation) on the file sharing control. In response to the user's trigger operation on the file sharing control, the first computer can display the identifier of at least one available device (such as a device name). Afterwards, the first computer can receive the user's selection operation on the identifier corresponding to the second computer in the identifier of at least one available device, indicating that the first computer needs to transfer the target file of the first computer to the second computer based on the WiFi connection. In response to the user's selection operation on the identifier corresponding to the second computer, the first computer can create a target hotspot so that the second computer can establish a WiFi connection with the first computer through the target hotspot, and then the first computer can share files with the second computer.
[0188] S602: In response to the data transmission operation, the first computer creates a target hotspot.
[0189] The target hotspot can be an access point (i.e., Legacy AP), a group owner (i.e., GO), a virtual access point (i.e., SoftAP), a personal mobile hotspot, or a hotspot. After the first computer receives the data transmission operation, the first computer can create a target hotspot, that is, the first computer can serve as an access point and establish a WiFi connection with the second computer.
[0190] For example, the first computer may create a target hotspot corresponding to a preset frequency band, which may be, for example, a 5 GHz frequency band.
[0191] In some examples, because the first computer is equipped with a WiFi chip from manufacturer A, to avoid interference with other basic service sets caused by the first computer's use of adjacent secondary channels, the first computer can set a smaller initial operating bandwidth for the target hotspot when creating the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0192] S603: The first computer sends information about the target hotspot to the second computer. The information about the target hotspot includes an identifier of the target hotspot and a maximum working bandwidth corresponding to the target hotspot.
[0193] After the first computer creates the target hotspot, the first computer may send information about the target hotspot to the second computer, so that the second computer may set a filtering condition based on the information about the target hotspot.
[0194] The information of the target hotspot may include the identifier of the target hotspot and the maximum operating bandwidth corresponding to the target hotspot. The identifier of the target hotspot can be used to uniquely identify the target hotspot. For example, the identifier of the target hotspot can be the basic service set identifier (i.e., basic service set identifier, BSSID) of the target hotspot. The basic service set identifier of the target hotspot refers to the MAC address corresponding to the target hotspot, i.e., the MAC address of the first computer. The second computer can establish a WiFi connection with the first computer through the basic service set identifier of the target hotspot.
[0195] The maximum operating bandwidth corresponding to the target hotspot refers to the maximum spectrum range available for data transmission through the target hotspot, that is, the maximum operating bandwidth supported by the first computer when the first computer plays the role of the target hotspot (such as Legacy AP or GO). The maximum operating bandwidth corresponding to the target hotspot is related to the operating frequency band corresponding to the target hotspot. For example, when the target hotspot is a target hotspot corresponding to the 5GHz operating frequency band, the maximum operating bandwidth corresponding to the target hotspot is 80MHz or 160MHz.
[0196] In some examples, the information of the target hotspot may also include the service set identifier of the target hotspot, the working channel corresponding to the target hotspot, and the password corresponding to the target hotspot. The service set identifier of the target hotspot refers to the name of the target hotspot, that is, the device name of the first computer. The working channel corresponding to the target hotspot may indicate the working channel corresponding to the working frequency band supported by the first computer when the role of the first computer is the target hotspot (such as Legacy AP or GO). The password corresponding to the target hotspot may be pre-set by the first computer or pre-set by the user.
[0197] In some examples, the first computer sending the target hotspot information to the second computer may include: the first computer may send the target hotspot information to the second computer via Bluetooth communication.
[0198] S604: The second computer receives the target hotspot information sent by the first computer.
[0199] After the second computer receives the target hotspot information sent by the first computer, the second computer can set filtering conditions based on the target hotspot information.
[0200] S605: The second computer obtains the chip type of the WiFi chip configured in the second computer.
[0201] Due to certain differences in the design and architecture of the WiFi chip of manufacturer A and the WiFi chip of manufacturer B, when a second computer equipped with a WiFi chip of manufacturer B establishes a WiFi connection with a first computer equipped with a WiFi chip of manufacturer A and transmits data through the WiFi connection, data can only be transmitted using the smaller bandwidth initially claimed by the first computer, and cannot be transmitted using the larger bandwidth negotiated between the first and second computers. Therefore, before the second computer sets filtering conditions, the second computer can obtain the chip type of the WiFi chip configured in the second computer and determine whether the chip type of the WiFi chip configured in the second computer is the first type. If the chip type of the WiFi chip configured in the second computer is the first type, the second computer can set filtering conditions based on the information of the target hotspot.
[0202] S606: When the chip type of the WiFi chip configured in the second computer is the first type, the second computer sets a filtering condition according to the information of the target hotspot, wherein the filtering condition includes a target identifier and a target working bandwidth.
[0203] The chip type of the WiFi chip can refer to the manufacturer of the WiFi chip. The first type can be used to indicate the WiFi chip of the target manufacturer (i.e., the WiFi chip of manufacturer B). That is, if the WiFi chip configured on the second computer is the WiFi chip of the target manufacturer, the second computer sets the filtering conditions based on the information of the target hotspot.
[0204] The filtering conditions may include a target identifier and a target operating bandwidth. The target identifier may be used to determine whether the hotspot scanned by the second computer is the target hotspot. The target operating bandwidth may be the operating bandwidth to be set for the target hotspot.
[0205] In some examples, the second computer sets filtering conditions based on the target hotspot information, which may include: determining the identifier of the target hotspot as the target identifier, and determining the maximum operating bandwidth corresponding to the target hotspot as the target operating bandwidth. For example, the target operating bandwidth may be 80 MHz or 160 MHz.
[0206] In some examples, when the chip type of the WiFi chip configured on the second computer is the first type, the second computer can obtain the data volume corresponding to the target data. When the data volume corresponding to the target data is greater than or equal to the preset data volume, the second computer sets filtering conditions based on the information of the target hotspot. In this way, when the data volume of the target data to be transmitted is less than the preset data volume, there is no need to set filtering conditions, and the target data can be transmitted using the initial working bandwidth when the first computer creates the access point. When the data volume of the target data to be transmitted is greater than or equal to the preset data volume, by setting filtering conditions, the working bandwidth of the second computer as a site can be adjusted to the target working bandwidth, and the target data can be transmitted using the target working bandwidth, which can increase the file transfer rate and thus improve the user experience.
[0207] In this embodiment of the present application, after the second computer sets the filtering conditions, the second computer can establish a WiFi connection with the first computer and set the operating bandwidth corresponding to the WiFi connection as the target operating bandwidth. The following describes the process of establishing a WiFi connection between the second computer and the first computer and setting the operating bandwidth corresponding to the WiFi connection as the target operating bandwidth, in conjunction with S607-S615.
[0208] S607: The first computer sends a beacon frame to the second computer, where the beacon frame includes an initial working bandwidth.
[0209] After the first computer sends the target hotspot information to the second computer, the first computer serving as the target hotspot (i.e., the first computer providing the WiFi hotspot function) can send a beacon frame to the second computer. This means the first computer periodically broadcasts beacon frames to enable the second computer to establish a WiFi connection with the first computer. The beacon frame may include an initial operating bandwidth, which may be the operating bandwidth corresponding to the target hotspot set by the first computer when creating the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0210] S608: The second computer receives the beacon frame sent by the first computer.
[0211] After the first computer sends a beacon frame to the second computer, the second computer receives the beacon frame sent by the first computer, indicating that the second computer has scanned a hotspot. In the case of a hotspot scanned by the second computer, the second computer can determine the identifier corresponding to the scanned hotspot to determine whether the second computer has scanned the target hotspot created by the first computer based on the identifier corresponding to the scanned hotspot.
[0212] In some examples, after a first computer sends information about a target hotspot to a second computer, the second computer may also send a probe request frame to the first computer. After receiving the probe request frame from the second computer, the first computer may send a probe response frame to the second computer. In other words, after a first computer sends information about a target hotspot to a second computer, the second computer may scan for the hotspot using the beacon frames broadcast by the first computer. The second computer may also scan for the target hotspot by sending a probe request frame to the first computer.
[0213] S609. The second computer determines whether the identifier corresponding to the scanned hotspot matches the target identifier. If the identifier corresponding to the scanned hotspot matches the target identifier, the second computer sets the working bandwidth of the target hotspot as the target working bandwidth.
[0214] After the second computer determines the identifier corresponding to the scanned hotspot, the second computer can determine the identifier corresponding to the scanned hotspot, and can compare the identifier corresponding to the scanned hotspot with the target identifier in the filtering condition (i.e., the identifier of the target hotspot created by the first computer). When the identifier corresponding to the hotspot scanned by the second computer matches the target identifier in the filtering condition, it means that the hotspot scanned by the second computer can support the target working bandwidth in the filtering condition. Therefore, the second computer can set the working bandwidth of the target hotspot to the target working bandwidth (such as 80MHz or 160MHz), that is, when the second computer acts as a site (or group client), the second computer sets the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer to the target working bandwidth, that is, the second computer sets the working bandwidth of the second computer as a site to the target working bandwidth.
[0215] In some examples, the specific process of the second computer setting the working bandwidth of the target hotspot to the target working bandwidth may include: the second computer is provided with a bandwidth setting interface, and when the identifier corresponding to the hotspot scanned by the second computer matches the target identifier in the filtering condition, the second computer can send the target working bandwidth to the WiFi chip of the second computer through the bandwidth setting interface to set the working bandwidth of the WiFi chip of the second computer to the target working bandwidth (such as 80MHz or 160MHz).
[0216] In some examples, when the identifier corresponding to the hotspot scanned by the second computer does not match the target identifier in the filtering conditions, the second computer establishes a WiFi connection with the first computer, so that the first computer and the second computer transmit data based on the WiFi connection. That is, when the identifier corresponding to the hotspot scanned by the second computer does not match the target identifier in the filtering conditions, it means that the hotspot scanned by the second computer is not the target hotspot created by the first computer, and the step of the second computer setting the working bandwidth of the target hotspot to the target working bandwidth is not executed.
[0217] S610: The second computer sends an authentication request frame to the first computer.
[0218] S611. The first computer receives an authentication request frame sent by the second computer, and sends an authentication response frame in response to the authentication request frame to the second computer.
[0219] After the second computer sets the working bandwidth of the target hotspot to the target working bandwidth, the second computer sends an authentication request frame to the first computer. When the first computer receives the authentication request frame sent by the second computer, the first computer can send an authentication response frame for the authentication request frame to the second computer, thereby completing the authentication stage.
[0220] S612: The second computer receives the authentication response frame sent by the first computer, and sends an association request frame to the first computer, where the association request frame includes the target working bandwidth.
[0221] After the second computer receives the authentication response frame sent by the first computer, the second computer may send an association request frame to the first computer to request access to the target hotspot created by the first computer.
[0222] Additionally, when the second computer associates with the target hotspot created by the first computer, the second computer can negotiate an operating bandwidth with the first computer. For example, the association request frame can include the target operating bandwidth (e.g., 80 MHz or 160 MHz). By sending an association request frame carrying the target operating bandwidth to the first computer, the second computer can notify the first computer that the operating bandwidth of the target hotspot needs to be expanded to the target operating bandwidth.
[0223] S613: The first computer receives the association request frame sent by the second computer, and the first computer expands the initial working bandwidth corresponding to the target hotspot to the target working bandwidth.
[0224] When the first computer receives an association request frame carrying the target working bandwidth sent by the second computer, the first computer can expand the working bandwidth corresponding to the target hotspot from the initial working bandwidth (such as 20MHz) to the target working bandwidth (such as 80MHz or 160MHz), that is, when the first computer acts as the target hotspot (such as an access point, a group owner, a personal mobile hotspot, a virtual access point), the first computer expands the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer from the initial working bandwidth (such as 20MHz) to the target working bandwidth (such as 80MHz or 160MHz), that is, the first computer expands the working bandwidth of the first computer as the target hotspot from the initial working bandwidth (such as 20MHz) to the target working bandwidth (such as 80MHz or 160MHz).
[0225] S614. The first computer sends an association response frame to the second computer in response to the association request frame. The association response frame is used to indicate that the working bandwidth of the target hotspot created by the first computer is extended to the target working bandwidth.
[0226] After the first computer expands the operating bandwidth corresponding to the target hotspot from the initial operating bandwidth to the target operating bandwidth, the first computer can send an association response frame to the second computer in response to the association request frame. The association response frame can include the expanded operating bandwidth (i.e., the target operating bandwidth), thus completing the association phase. In other words, during the association phase, the first computer and the second computer negotiate the operating bandwidth corresponding to the target hotspot to be the target operating bandwidth.
[0227] S615: The first computer and the second computer perform a four-way handshake.
[0228] It should be noted that, for the specific implementation method of the four-way handshake between the first computer and the second computer in the embodiment of the present application, reference can be made to S507-S510 above, which will not be described in detail in the embodiment of the present application.
[0229] S616: The first computer and the second computer transmit target data using the target working bandwidth.
[0230] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the first computer transmits the target data to the second computer (i.e., the data transmission operation is a data transmission operation input by the user for the target data of the first computer), the first computer may use the target working bandwidth to transmit the target data (such as a file) to the second computer.
[0231] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the second computer transmits the target data to the first computer (i.e., the data transmission operation is a data transmission operation input by the user for the target data of the second computer), the second computer may use the target working bandwidth to transmit the target data (such as a file) to the first computer.
[0232] In an embodiment of the present application, when a first computer and a second computer are transmitting target data, the second computer, as a site (or group client), can set filtering conditions based on the information of the target hotspot created by the first computer, which is an access point (or group owner). Afterwards, if the hotspot scanned by the second computer is the target hotspot created by the first computer, the second computer can adjust the working bandwidth of the second computer as a site (or group client) to the target working bandwidth based on the filtering conditions. As a result, the second computer and the first computer can use a larger target working bandwidth to transmit data, which can increase the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0233] In some embodiments, when the first electronic device is a terminal device, the first electronic device does not provide a working bandwidth supported by the WiFi chip carried by the first electronic device for setting the target data. Therefore, when the first electronic device and the second electronic device transmit target data, the first electronic device, as a site (or group client), can obtain the working frequency band corresponding to the target hotspot (i.e., access point or group owner) created by the second electronic device. Thereafter, when the working frequency band corresponding to the access point (or group owner) created by the second electronic device is the target frequency band, the first electronic device can adjust the working bandwidth supported by the WiFi chip carried by it to the maximum working bandwidth corresponding to the target frequency band (i.e., target working bandwidth), and then the target working bandwidth can be used to transmit target data between the first electronic device and the second electronic device.
[0234] Taking the first electronic device as a mobile phone equipped with a WiFi chip of manufacturer B and the second electronic device as a first computer equipped with a WiFi chip of manufacturer A as an example, as shown in Figure 8, the data transmission method provided in the embodiment of the present application may include: S801-S812.
[0235] S801: The first computer receives a data transmission operation.
[0236] The data transmission operation can be used to trigger the transmission of target data between the first computer and the mobile phone. The data transmission operation can be input by the user. For example, when the first computer, as an access point or group owner, needs to transmit target data to the mobile phone, which is a site or group client, the first computer can receive the data transmission operation input by the user. The data transmission operation can also be sent by the mobile phone, which is a site or group client. For example, when the mobile phone, as a site or group client, needs to transmit target data to the first computer, which is an access point or group owner, the mobile phone can receive the data transmission operation input by the user, and in response, the mobile phone can send the data transmission operation to the first computer.
[0237] Exemplarily, the data transfer operation can be used to trigger a device cloning operation between the first computer and the mobile phone, can also be used to trigger a data migration operation between the first computer and the mobile phone, and can also be used to trigger a file sharing operation between the first computer and the mobile phone.
[0238] It should be noted that the specific implementation method of the input data transmission operation in the embodiment of the present application can refer to the above S601, which will not be repeated in the embodiment of the present application.
[0239] S802: In response to the data transmission operation, the first computer creates a target hotspot.
[0240] The target hotspot can be an access point (i.e., Legacy AP), a group owner (i.e., GO), a virtual access point (i.e., SoftAP), a personal mobile hotspot, or a hotspot. After the first computer receives the data transmission operation, the first computer can create a target hotspot, that is, the first computer can serve as an access point and establish a WiFi connection with the mobile phone.
[0241] In some examples, because the first computer is equipped with a WiFi chip from manufacturer A, to avoid interference with other basic service sets caused by the first computer's use of adjacent secondary channels, the first computer can set a smaller initial operating bandwidth for the target hotspot when creating the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0242] In this embodiment of the present application, after the first computer creates a target hotspot, the mobile phone can establish a WiFi connection with the first computer and set the operating bandwidth corresponding to the WiFi connection to the target operating bandwidth. The following describes the process of establishing a WiFi connection between the mobile phone and the first computer and setting the operating bandwidth corresponding to the WiFi connection to the target operating bandwidth, in conjunction with S803-S814.
[0243] S803. The first computer sends a beacon frame to the mobile phone. The beacon frame includes the working frequency band and initial working bandwidth corresponding to the target hotspot.
[0244] After the first computer creates the target hotspot, it can send a beacon frame to the mobile phone. That is, the first computer periodically broadcasts beacon frames, allowing the mobile phone to establish a WiFi connection with the first computer. The beacon frame may include the operating frequency band corresponding to the target hotspot and the initial operating bandwidth corresponding to the target hotspot. The initial operating bandwidth may be the operating bandwidth corresponding to the target hotspot set when the first computer created the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0245] S804. The mobile phone receives a beacon frame sent by the first computer.
[0246] When the mobile phone receives the beacon frame sent by the first computer, it indicates that the mobile phone has scanned the target hotspot created by the first computer.
[0247] In some examples, after the first computer creates a target hotspot, the mobile phone can also send a probe request frame to the first computer. After the first computer receives the probe request frame sent by the mobile phone, the first computer can send a probe response frame to the mobile phone. In other words, after the first computer creates a target hotspot, the mobile phone can scan for the target hotspot created by the first computer through the beacon frame broadcast by the first computer. The mobile phone can also scan for the target hotspot created by the first computer by sending a probe request frame to the first computer.
[0248] S805: When the working frequency band corresponding to the target hotspot is the target frequency band, the mobile phone sets the working bandwidth of its configured WiFi chip to the target working bandwidth.
[0249] The target frequency band can be a frequency band that supports a larger operating bandwidth, such as the 5 GHz band or the 6 GHz band. The target operating bandwidth is the maximum operating bandwidth supported by the first computer when the first computer creates a target hotspot corresponding to the target frequency band, such as 80 MHz or 160 MHz.
[0250] When the mobile phone receives the beacon frame sent by the first computer, the mobile phone can obtain the working frequency band corresponding to the target hotspot created by the first computer. The mobile phone can determine whether the working frequency band corresponding to the target hotspot created by the first computer is the target frequency band (such as the 5GHz band). When the working frequency band corresponding to the target hotspot created by the first computer is the target frequency band (such as the 5GHz band), the mobile phone can set the working bandwidth of its configured WiFi chip to the target working bandwidth (such as 80MHz or 160MHz), that is, when the mobile phone is used as a site, the mobile phone sets the working bandwidth corresponding to the WiFi connection established between the mobile phone and the first computer to the target working bandwidth, that is, the mobile phone sets the working bandwidth of the mobile phone as a site to the target working bandwidth.
[0251] In some examples, when a mobile phone sets the operating bandwidth of its configured WiFi chip to a target operating bandwidth, the mobile phone can write the target operating bandwidth into the firmware of the configured WiFi chip.
[0252] In some examples, before a mobile phone sets the operating bandwidth of its configured WiFi chip to the target operating bandwidth, the mobile phone can obtain the data volume corresponding to the target data. If the data volume corresponding to the target data is greater than or equal to the preset data volume, and the operating frequency band corresponding to the target hotspot is the target frequency band, the mobile phone sets the operating bandwidth of its configured WiFi chip to the target operating bandwidth. In this way, when the data volume of the target data to be transmitted is less than the preset data volume, the target data can be transmitted using the initial operating bandwidth when the first computer creates the access point; and when the data volume of the target data to be transmitted is greater than or equal to the preset data volume, the operating bandwidth of the mobile phone as a station can be adjusted to the target operating bandwidth, and the target data can be transmitted using the target operating bandwidth, which can increase the file transfer rate and thus enhance the user experience.
[0253] S806. The mobile phone sends an authentication request frame to the first computer.
[0254] S807: The first computer receives the authentication request frame sent by the mobile phone, and sends an authentication response frame in response to the authentication request frame to the mobile phone.
[0255] After the mobile phone sets the working bandwidth of its configured WiFi chip to the target working bandwidth, the mobile phone can send an authentication request frame to the first computer. When the first computer receives the authentication request frame sent by the mobile phone, the first computer can send an authentication response frame for the authentication request frame to the mobile phone, thereby completing the authentication stage.
[0256] S808. The mobile phone receives the authentication response frame sent by the first computer, and sends an association request frame to the first computer, where the association request frame includes the target working bandwidth.
[0257] After the mobile phone receives the authentication response frame sent by the first computer, the mobile phone can send an association request frame to the first computer to request access to the target hotspot created by the first computer. The association request frame may include the target operating bandwidth. The mobile phone can send an association request frame carrying the target operating bandwidth to the first computer, thereby notifying the first computer that the operating bandwidth of the mobile phone when it is a site (or group client) is the target operating bandwidth (e.g., 80MHz or 160MHz).
[0258] S809: The first computer receives the association request frame sent by the mobile phone, and if the first computer supports the target working bandwidth, the first computer expands the initial working bandwidth corresponding to the target hotspot to the target working bandwidth.
[0259] When the first computer receives the association request frame sent by the mobile phone, the first computer can negotiate bandwidth with the mobile phone based on the working bandwidth it supports. In some examples, when the first computer supports the target working bandwidth (i.e., the maximum working bandwidth supported by the first computer when acting as an access point is greater than or equal to the target working bandwidth), the first computer can expand the initial working bandwidth corresponding to the target hotspot (e.g., 20MHz) to the target working bandwidth (e.g., 80MHz or 160MHz). That is, when the first computer acts as the target hotspot (e.g., an access point, a group owner, a personal mobile hotspot, a virtual access point), the first computer expands the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer from the initial working bandwidth (e.g., 20MHz) to the target working bandwidth (e.g., 80MHz or 160MHz). After the first computer expands the initial working bandwidth corresponding to the target hotspot to the target working bandwidth, the first computer sends an association response frame to the mobile phone. The association response frame may include the expanded working bandwidth (i.e., the target working bandwidth), thus completing the association phase. That is, during the association phase, the first computer and the mobile phone negotiate the working bandwidth corresponding to the target hotspot to be the target working bandwidth.
[0260] For example, the mobile phone sets the working bandwidth of its configured WiFi chip to 80MHz. When the first computer supports an 80MHz working bandwidth, the first computer expands the initial working bandwidth corresponding to the target hotspot (such as 20MHz) to 80MHz and sends an association response frame to the mobile phone. The bandwidth information carried by the association response frame is 80MHz, that is, the mobile phone and the first computer negotiate the working bandwidth corresponding to the target hotspot to 80MHz (that is, the target working bandwidth).
[0261] In some examples, if the first computer does not support the target operating bandwidth (i.e., the maximum operating bandwidth supported by the first computer when acting as an access point is less than the target operating bandwidth), the first computer can negotiate with the mobile phone to reduce the target operating bandwidth to the maximum operating bandwidth supported by the first computer (i.e., the maximum operating bandwidth supported by the first computer when acting as an access point). Afterwards, the first computer and the mobile phone can use the negotiated operating bandwidth (i.e., the maximum operating bandwidth supported by the first computer when acting as an access point) for data transmission based on the WiFi connection.
[0262] For example, the mobile phone sets the working bandwidth of its configured WiFi chip to 80MHz. When the maximum working bandwidth supported by the first computer as an access point is 40MHz (the first computer does not support the target working bandwidth of 80MHz), the first computer expands the initial working bandwidth corresponding to the target hotspot (such as 20MHz) to 40MHz, and sends an association response frame to the mobile phone. The bandwidth information carried by the association response frame is 40MHz, that is, the mobile phone and the first computer negotiate the working bandwidth corresponding to the target hotspot to 40MHz (that is, the maximum working bandwidth supported when the first computer is used as an access point).
[0263] S810. The first computer sends an association response frame to the mobile phone in response to the association request frame. The association response frame is used to instruct the operating bandwidth of the target hotspot created by the first computer to be extended to the target operating bandwidth.
[0264] After the first computer expands the initial working bandwidth corresponding to the target hotspot to the target working bandwidth, the first computer can send an association response frame to the mobile phone for the association request frame, where the association response frame is used to indicate that the working bandwidth of the target hotspot created by the first computer is expanded to the target working bandwidth.
[0265] S811. The first computer and the mobile phone perform a four-way handshake.
[0266] It should be noted that, for the specific implementation method of the four-way handshake between the first computer and the mobile phone in the embodiment of the present application, reference can be made to S507-S510 above, which will not be repeated in the embodiment of the present application.
[0267] S812. Target data is transmitted between the first computer and the mobile phone using the target working bandwidth.
[0268] In some examples, the target data may be transmitted between the first computer and the mobile phone using the target working bandwidth, which may include: when the first computer transmits the target data to the mobile phone (i.e., the data transmission operation is a data transmission operation input by the user for the target data of the first computer), the first computer may use the target working bandwidth to transmit the target data (such as a file) to the mobile phone.
[0269] In some examples, the target data is transmitted between the first computer and the mobile phone using the target working bandwidth, which may include: when the mobile phone transmits the target data to the first computer (i.e., the data transmission operation is a data transmission operation input by the user for the target data of the mobile phone), the mobile phone may use the target working bandwidth to transmit the target data (such as a file) to the first computer.
[0270] In an embodiment of the present application, when the first computer and the mobile phone transmit target data, the mobile phone, as a site (or group client), can obtain the operating frequency band corresponding to the target hotspot (i.e., access point or group owner) created by the first computer. When the operating frequency band corresponding to the target hotspot is the target frequency band, the mobile phone can adjust the operating bandwidth supported by its WiFi chip to the maximum operating bandwidth corresponding to the target frequency band (i.e., the target operating bandwidth), and then the first computer and the mobile phone can use a larger target operating bandwidth to transmit target data, which can increase the data transmission rate, shorten the data transmission time, and thus improve the user experience.
[0271] In some embodiments, when a first electronic device transmits target data with a second electronic device, the first electronic device, as a site (or group client), can establish a WiFi connection with the second electronic device, which is a target hotspot (i.e., an access point or group owner). Afterwards, if the working bandwidth corresponding to the WiFi connection is inconsistent with the target working bandwidth, the first electronic device can send a reconnection notification to the second electronic device to notify the second electronic device that the first electronic device will disconnect from the second electronic device and re-establish the WiFi connection. Thereafter, the first electronic device re-establishes a WiFi connection with the second electronic device, wherein the working bandwidth corresponding to the re-established WiFi connection is the target working bandwidth, and the target data can be transmitted between the first electronic device and the second electronic device using the target working bandwidth.
[0272] Taking the first electronic device as the second computer equipped with a WiFi chip of manufacturer B and the second electronic device as the first computer equipped with a WiFi chip of manufacturer A as an example, as shown in Figure 9, the data transmission method provided in the embodiment of the present application may include: S901-S911.
[0273] S901: A first computer receives a data transmission operation for target data.
[0274] A data transfer operation can be used to trigger the transfer of target data between a first computer and a second computer. The data transfer operation can be user-input. For example, when the first computer, as an access point or group owner, needs to transfer target data to a second computer, as a site or group client, the first computer can receive the data transfer operation input by the user. The data transfer operation can also be sent by the second computer, as a site or group client. For example, when the second computer, as a site or group client, needs to transfer target data to the first computer, as an access point or group owner, the second computer can receive the data transfer operation input by the user, and in response, the second computer can send the data transfer operation to the first computer.
[0275] S902: In response to the data transmission operation, the first computer creates a target hotspot.
[0276] The target hotspot can be an access point (i.e., Legacy AP), a group owner (i.e., GO), a virtual access point (i.e., SoftAP), a personal mobile hotspot, or a hotspot. After the first computer receives the data transmission operation, the first computer can create a target hotspot, that is, the first computer can serve as an access point and establish a WiFi connection with the second computer.
[0277] In some examples, because the first computer is equipped with a WiFi chip from manufacturer A, to avoid interference with other basic service sets caused by the first computer's use of adjacent secondary channels, the first computer can set a smaller initial operating bandwidth for the target hotspot when creating the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0278] S903: The first computer sends a first beacon frame to the second computer, where the first beacon frame includes an initial working bandwidth corresponding to the target hotspot.
[0279] After the first computer creates a target hotspot, the first computer serving as the target hotspot (i.e., the first computer providing the WiFi hotspot function) can send a first beacon frame to the second computer. In other words, the first computer periodically broadcasts the first beacon frame so that the second computer can access the target hotspot created by the first computer, i.e., the second computer can establish a WiFi connection with the first computer. The first beacon frame can include an initial operating bandwidth, which can be the operating bandwidth corresponding to the target hotspot set when the first computer creates the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0280] In some examples, after a first computer creates a target hotspot, a second computer may also send a probe request frame to the first computer. After receiving the probe request frame sent by the second computer, the first computer may send a probe response frame to the second computer. In other words, after a first computer creates a target hotspot, the second computer may scan for the target hotspot created by the first computer using the first beacon frame broadcast by the first computer. The second computer may also scan for the target hotspot created by the first computer by sending a probe request frame to the first computer.
[0281] S904: When the second computer receives the first beacon frame sent by the first computer, the second computer accesses the target hotspot created by the first computer.
[0282] When the second computer receives the first beacon frame sent by the first computer, the second computer can access the target hotspot created by the first computer, that is, the second computer establishes a WiFi connection with the first computer.
[0283] For example, after the second computer receives the first beacon frame sent by the first computer, the second computer can send an authentication request frame to the first computer. When the first computer receives the authentication request frame sent by the second computer, the first computer can send an authentication response frame to the second computer for the authentication request frame, thus completing the authentication phase. After the second computer receives the authentication response frame sent by the first computer, the second computer can send an association request frame carrying the target working bandwidth (such as 80MHz or 160MHz) to the first computer, requesting access to the target hotspot created by the first computer, and notifying the first computer that the working bandwidth of the target hotspot needs to be expanded to the target working bandwidth. When the first computer receives the association request frame carrying the target working bandwidth sent by the second computer, the first computer can expand the working bandwidth corresponding to the target hotspot from the initial working bandwidth (such as 20MHz) to the target working bandwidth (such as 80MHz or 160MHz), and send an association response frame to the second computer for the association request frame. The association response frame can include the expanded working bandwidth (i.e., the target working bandwidth), thus completing the association phase. That is, in the association phase, the second computer and the first computer negotiate the working bandwidth corresponding to the target hotspot to be the target working bandwidth (such as 80MHz or 160MHz). Afterwards, the first computer and the second computer perform a four-way handshake, that is, the second computer and the first computer establish a WiFi connection.
[0284] It should be noted that the specific implementation method of establishing a WiFi connection between the second computer and the first computer in the embodiment of the present application can be referred to S503-S510, which will not be repeated in the embodiment of the present application.
[0285] S905: The second computer obtains the data volume corresponding to the target data.
[0286] After the second computer accesses the target hotspot created by the first computer (i.e., the second computer establishes a WiFi connection with the first computer), the second computer can obtain the data volume corresponding to the target data, and then the second computer can determine whether it needs to send a disconnection notification to the first computer based on the size of the data volume corresponding to the target data.
[0287] S906. When the data volume corresponding to the target data is greater than or equal to the preset data volume, the second computer sends a reconnection notification to the first computer. The reconnection notification is used to instruct the second computer to disconnect from the target hotspot created by the first computer and re-establish a connection.
[0288] The preset data volume can be used to measure whether the data volume corresponding to the target data is large. For example, the preset data volume is 1G. That is to say, when the second computer determines that the data volume corresponding to the target data is greater than or equal to the preset data volume, the second computer can send a reconnection notification to the first computer. The reconnection notification can be used to instruct the second computer to disconnect from the target hotspot created by the first computer and re-establish a connection. That is, the second computer notifies the first computer by sending a reconnection notification to the first computer. At this time, the second computer will disconnect from the first computer and re-establish a WiFi connection to avoid the first computer canceling the target hotspot (i.e., destroying the target hotspot).
[0289] In some examples, when the second computer determines that the data volume corresponding to the target data is less than a preset data volume, the second computer and the first computer may use the initial working bandwidth to transmit the target data.
[0290] S907: The second computer sends a deauthentication request frame to the first computer.
[0291] After the first computer receives the reconnection notification sent by the second computer or the second computer receives a response message to the reconnection notification sent by the first computer, the second computer sends a deauthentication request frame to the first computer.
[0292] S908. The first computer receives the deauthentication request frame sent by the second computer and sends a confirmation frame to the second computer.
[0293] After the second computer sends a reconnection notification to the first computer, the second computer can send a deauthentication request frame to the first computer. When the first computer receives the deauthentication request frame sent by the second computer, the first computer can reply with a confirmation frame to the second computer, that is, the second computer is disconnected from the target hotspot created by the first computer.
[0294] S909: The first computer sends a second beacon frame to the second computer, where the second beacon frame includes a target working bandwidth corresponding to the target hotspot.
[0295] Because when the second computer and the first computer establish a WiFi connection for the first time, the first computer expands the working bandwidth corresponding to the target hotspot from the initial working bandwidth (such as 20MHz) to the target working bandwidth (such as 80MHz or 160MHz). And because when the second computer disconnects the WiFi connection from the first computer, the first computer does not destroy the created target hotspot. Therefore, when the first computer broadcasts a beacon frame again (that is, the first computer sends a second beacon frame to the second computer), the working bandwidth information carried by the second beacon frame is the target working bandwidth (such as 80MHz or 160MHz), that is, the first computer can send a second beacon frame carrying the target working bandwidth to the second computer, so that the second computer can re-access the target hotspot created by the first computer.
[0296] S910: When the second computer receives the second beacon frame sent by the first computer, the second computer re-accesses the target hotspot created by the first computer.
[0297] When the second computer receives the second beacon frame sent by the first computer, the second computer can re-access the target hotspot created by the first computer, that is, the second computer re-establishes a WiFi connection with the first computer.
[0298] Exemplarily, after the second computer receives the second beacon frame sent by the first computer, the second computer can send an authentication request frame to the first computer. When the first computer receives the authentication request frame sent by the second computer, the first computer can send an authentication response frame for the authentication request frame to the second computer, thus completing the authentication phase. After the second computer receives the authentication response frame sent by the first computer, the second computer can send an association request frame carrying the target working bandwidth (such as 80MHz or 160MHz) to the first computer, requesting access to the target hotspot created by the first computer. When the first computer receives the association request frame sent by the second computer, the first computer can send an association response frame for the association request frame to the second computer. The association response frame can include the expanded working bandwidth (i.e., the target working bandwidth), thus completing the association phase. That is, in the association phase, the second computer and the first computer negotiate the working bandwidth corresponding to the target hotspot to be the target working bandwidth (such as 80MHz or 160MHz). Afterwards, the first computer and the second computer perform a four-way handshake, i.e., the second computer and the first computer re-establish a WiFi connection.
[0299] It should be noted that the specific implementation method of re-establishing the WiFi connection between the second computer and the first computer in the embodiment of the present application can be referred to S503-S510, which will not be repeated in the embodiment of the present application.
[0300] S911. Target data is transmitted between the first computer and the second computer using a target working bandwidth.
[0301] When the first and second computers reestablish a WiFi connection, the first computer can send a second beacon frame carrying the target operating bandwidth to the second computer. Therefore, when the second computer receives the second beacon frame sent by the first computer (i.e., the second computer discovers that the first computer has created the target hotspot), the second computer can write a larger target operating bandwidth (such as 80MHz or 160MHz) into the firmware of the WiFi chip that the second computer can carry. In this way, the first and second computers can use the target operating bandwidth to transmit target data.
[0302] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the first computer transmits the target data to the second computer (i.e., the data transmission operation is a data transmission operation input by the user for the target data of the first computer), the first computer may use the target working bandwidth to transmit the target data (such as a file) to the second computer.
[0303] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the second computer transmits the target data to the first computer (i.e., the data transmission operation is a data transmission operation input by the user for the target data of the second computer), the second computer may use the target working bandwidth to transmit the target data (such as a file) to the first computer.
[0304] In an embodiment of the present application, when the first computer and the second computer transmit target data, the second computer, as a site (or group client), can establish a WiFi connection with the first computer as a target hotspot (i.e., an access point or group owner). Afterwards, when the working bandwidth corresponding to the WiFi connection is inconsistent with the target working bandwidth, the second computer can send a reconnection notification to the first computer to notify the first computer that the second computer will disconnect from the first computer and re-establish the WiFi connection. Afterwards, the second computer re-establishes a WiFi connection with the first computer, wherein the working bandwidth corresponding to the re-established WiFi connection is the target working bandwidth, and then the first computer and the second computer can use a larger target working bandwidth to transmit target data, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0305] In some embodiments, when a first electronic device and a second electronic device transmit target data, if the working bandwidth for transmitting data between the first electronic device and the second electronic device is inconsistent with the target working bandwidth (that is, the first electronic device and the second electronic device cannot use the negotiated larger working bandwidth to transmit data), the first electronic device can send a management frame notification to the second electronic device to adjust the working bandwidth corresponding to the WiFi connection established between the first electronic device and the second electronic device to the target working bandwidth indicated by the management frame notification, so that the target data can be transmitted between the first electronic device and the second electronic device using the target working bandwidth.
[0306] The management frame notification may be an 802.11 management frame notification. For example, the management frame notification may be an extended channel switch announcement (ie, an extended channel switch announcement, ECSA).
[0307] As shown in Figure 10, the extended channel switch notification (i.e., ECSA) may include six fields: information element identifier (i.e., element id), length (i.e., length), channel switch mode (i.e., channel switch mode), new channel (i.e., new channel number), new operating class (i.e., new operating class), and channel switch count (i.e., channel switch count).
[0308] Among them, the information element identifier can be used to identify a specific type of information element, so that the electronic device can correctly parse and process the received signal. The length can be used to indicate the length of the field corresponding to the extended channel switching notification. The field corresponding to the channel switching mode can be used to indicate the channel switching mode currently supported by the electronic device. The field corresponding to the new operating level can indicate the new operating level currently corresponding to the electronic device. The new operating level of the electronic device is different, and the working bandwidth of the electronic device as a site is different, that is, by setting the field corresponding to the new operating level of the extended channel switching notification, the electronic device can be notified to adjust the working bandwidth of the electronic device as a site according to the field corresponding to the new operating level. For example, the field corresponding to the new operating level is set to 124, that is, when the electronic device receives the extended channel switching notification, the electronic device can set its working bandwidth corresponding to the site to 80MHz.
[0309] Exemplarily, the management frame notification may also be an operating mode notification (ie, operating mode notification, OMN).
[0310] As shown in Figure 11, the operating mode notification (i.e., OMN) may include five fields: channel bandwidth (i.e., channel width), 160 / 80+80BW, No LDPC, receive spatial streams (i.e., Rx NSS), and receive spatial stream type (i.e., Rx NSS Type). The field corresponding to channel bandwidth can be used to indicate the operating bandwidth that the electronic device supports as a station. By setting the field corresponding to channel bandwidth in the operating mode notification, the electronic device can be notified to adjust the operating bandwidth of the electronic device as a station according to the field corresponding to channel bandwidth. For example, if the field corresponding to channel bandwidth is set to 0x2, the operating mode notification can instruct the electronic device to set its operating bandwidth as a station to 80MHz. The field corresponding to 160 / 80+80BW can be used to indicate the operating bandwidth bundling method when the operating bandwidth is 160MHz / 80MHz. For example, the field corresponding to 160 / 80+80BW can be set to 0x0. The field corresponding to No LDPC can be used to indicate whether LDPC-coded data is received. For example, the field corresponding to No LDPC can be set to 0x0. The field corresponding to receive spatial streams can indicate the spatial streams actually supported by the electronic device. For example, when the electronic device supports 2*2 MIMO, the field corresponding to the received spatial stream may be set to 0x2. For example, the field corresponding to the type of the received spatial stream may be set to 0x0.
[0311] In some examples, when the management frame notification is an extended channel switching notification (i.e., ECSA), an electronic device (such as a second electronic device) that serves as a target hotspot (i.e., an access point or a group owner) can send an extended channel switching notification to other electronic devices (such as a first electronic device) that serve as sites (or group clients) to notify other electronic devices (such as the first electronic device) to adjust the working bandwidth corresponding to the target hotspot to the target working bandwidth indicated by the extended channel switching notification.
[0312] Exemplarily, when an electronic device (such as a second electronic device) that serves as a target hotspot (i.e., an access point or a group owner) can send an extended channel switching notification to other electronic devices (such as a first electronic device) that serve as sites (or group clients), the chip type of the WiFi chip equipped in the other electronic devices (such as the first electronic device) can be obtained. When the chip type of the WiFi chip equipped in the other electronic devices (such as the first electronic device) is the first type, the electronic device (such as the second electronic device) that serves as a target hotspot (i.e., an access point or a group owner) can send an extended channel switching notification to other electronic devices (such as the first electronic device) that serve as sites (or group clients).
[0313] Exemplarily, when an electronic device (such as a second electronic device) that serves as a target hotspot (i.e., an access point or a group owner) can send an extended channel switching notification to other electronic devices (such as a first electronic device) that serve as sites (or group clients), the electronic device (such as the second electronic device) can determine whether the working bandwidth for transmitting data between the electronic device and the other electronic devices is consistent with the target working bandwidth indicated by the extended channel switching notification. If the working bandwidth for transmitting data between the electronic device and the other electronic devices is inconsistent with the target working bandwidth indicated by the extended channel switching notification, the electronic device (such as the second electronic device) that serves as the target hotspot (i.e., an access point or a group owner) can send an extended channel switching notification to other electronic devices (such as the first electronic device) that serve as sites (or group clients).
[0314] That is to say, there are two triggering conditions for an electronic device (such as a second electronic device) that is a target hotspot (i.e., an access point or a group owner) to send an extended channel switching notification to other electronic devices (such as a first electronic device) that are sites (or group clients). Among them, one triggering condition is that the chip type of the WiFi chip carried by other electronic devices that are sites (or group clients) is of the first type; the other triggering condition is that the working bandwidth for transmitting data between the electronic device and other electronic devices is inconsistent with the target working bandwidth indicated by the extended channel switching notification. Below, taking the above two triggering conditions as examples, the process of an electronic device that is a target hotspot sending an extended channel switching notification to other electronic devices that are sites to notify other electronic devices to adjust the working bandwidth corresponding to the target hotspot to the target working bandwidth indicated by the extended channel switching notification is schematically explained.
[0315] Taking the first electronic device as the second computer, the second electronic device as the first computer, and the trigger condition for the extended channel switching notification as the chip type of the WiFi chip equipped on the second computer serving as the site being the first type as an example, as shown in Figure 12, the data transmission method provided in the embodiment of the present application may include: S1001-S1011.
[0316] S1001: The first computer receives a data transmission operation.
[0317] A data transmission operation can be used to trigger the transmission of target data between a first computer and a second computer. The data transmission operation can be user-input. For example, when the first computer, as an access point or group owner, needs to transmit target data to the second computer, which is a site or group client, the first computer can receive the data transmission operation input by the user. The data transmission operation can also be sent by the second computer, which is a site or group client. For example, when the second computer, as a site or group client, needs to transmit target data to the first computer, which is an access point or group owner, the second computer can receive the data transmission operation input by the user, and in response, the second computer can send the data transmission operation to the first computer.
[0318] S1002: In response to the data transmission operation, the first computer creates a target hotspot.
[0319] The target hotspot can be an access point (i.e., Legacy AP), a group owner (i.e., GO), a virtual access point (i.e., SoftAP), a personal mobile hotspot, or a hotspot. After the first computer receives the data transmission operation, the first computer can create a target hotspot, that is, the first computer can serve as an access point and establish a WiFi connection with the second computer.
[0320] In some examples, because the first computer is equipped with a WiFi chip from manufacturer A, to avoid interference with other basic service sets caused by the first computer's use of adjacent secondary channels, the first computer can set a smaller initial operating bandwidth for the target hotspot when creating the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0321] S1003. The first computer sends a beacon frame to the second computer, where the beacon frame includes an initial working bandwidth corresponding to the target hotspot.
[0322] After the first computer creates a target hotspot, the first computer serving as the target hotspot (i.e., the first computer providing the WiFi hotspot function) can send a beacon frame to the second computer. This means the first computer periodically broadcasts beacon frames, enabling the second computer to establish a WiFi connection with the first computer. The beacon frame may include an initial operating bandwidth, which may be the operating bandwidth corresponding to the target hotspot set when the first computer created the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0323] S1004: The second computer receives the beacon frame sent by the first computer.
[0324] After the first computer sends a beacon frame to the second computer, the second computer receives the beacon frame sent by the first computer, that is, the second computer scans the target hotspot created by the first computer, and then the second computer can access the target hotspot created by the first computer.
[0325] S1005: The second computer sends a probe request frame to the first computer, where the probe request frame includes the chip type of the WiFi chip configured in the second computer.
[0326] Due to certain differences in the design and architecture of the WiFi chips of Manufacturer A and Manufacturer B, when a second computer equipped with Manufacturer B's WiFi chip establishes a WiFi connection with a first computer equipped with Manufacturer A's WiFi chip and transmits data via the WiFi connection, it can only use the smaller bandwidth initially claimed by the first computer for data transmission, and cannot use the larger bandwidth negotiated between the first and second computers. Therefore, after the second computer receives the beacon frame sent by the first computer, the second computer can send a probe request frame containing the chip type of the WiFi chip configured in the second computer to the first computer, so that the first computer can obtain the chip type of the WiFi chip configured in the second computer. Furthermore, the first computer can determine whether the chip type of the WiFi chip configured in the second computer is the first type. If the chip type of the WiFi chip configured in the second computer is the first type, the first computer can send an extended channel switch notification to the second computer to notify the second computer to reset the operating bandwidth corresponding to the target hotspot.
[0327] S1006. The first computer receives the probe request frame sent by the second computer, and sends a probe response frame to the second computer.
[0328] S1007. When the chip type of the WiFi chip configured in the second computer is the first type, the first computer sends an extended channel switching notification to the second computer. The extended channel switching notification is used to instruct the second computer to adjust the working bandwidth corresponding to the second computer as a site to the target working bandwidth.
[0329] The chip type of a WiFi chip can refer to the manufacturer of the WiFi chip. The first type can be used to indicate a WiFi chip from a target manufacturer (i.e., a WiFi chip from Manufacturer B). That is, if the first computer determines that the WiFi chip configured in the second computer is a WiFi chip from the target manufacturer, the first computer sends an extended channel switching notification to the second computer, instructing the second computer to adjust the operating bandwidth corresponding to the second computer as a station to the target operating bandwidth.
[0330] S1008. The second computer sets the working bandwidth of the second computer as a site as the target working bandwidth.
[0331] When the second computer receives the extended channel switching notification sent by the first computer, the second computer can set the working bandwidth corresponding to the target hotspot as the target working bandwidth, that is, when the second computer acts as a site (or group client), the second computer sets the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer as the target working bandwidth, that is, the second computer sets the working bandwidth of the second computer as a site to the target working bandwidth.
[0332] S1009: The first computer sets the working bandwidth corresponding to the target hotspot as the target working bandwidth.
[0333] After the first computer sends the extended channel switching notification to the second computer, the first computer can set the working bandwidth corresponding to the target hotspot as the target working bandwidth. That is, when the first computer serves as the target hotspot (such as an access point, group owner, personal mobile hotspot, virtual access point), the first computer sets the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer as the target working bandwidth, that is, the first computer sets the working bandwidth of the first computer as the target hotspot as the target working bandwidth.
[0334] It should be noted that S1009 can also be executed simultaneously with S1008, and S1009 can also be executed after S1008. The execution order of S1009 and S1008 is not specifically limited in the embodiment of the present application.
[0335] S1010. The second computer accesses the target hotspot created by the first computer.
[0336] After the second computer sets the working bandwidth of the second computer as the site as the target working bandwidth, and the first computer sets the working bandwidth corresponding to the target hotspot as the target working bandwidth, the second computer can access the target hotspot created by the first computer, that is, the second computer establishes a WiFi connection with the first computer.
[0337] Exemplarily, the process of establishing a WiFi connection between the second computer and the first computer may include: the second computer may send an authentication request frame to the first computer, and when the first computer receives the authentication request frame sent by the second computer, the first computer may send an authentication response frame for the authentication request frame to the second computer, thus completing the authentication phase. After the second computer receives the authentication response frame sent by the first computer, the second computer may send an association request frame carrying the target working bandwidth (such as 80MHz or 160MHz) to the first computer, requesting access to the target hotspot created by the first computer. When the first computer receives the association request frame carrying the target working bandwidth sent by the second computer, the first computer may send an association response frame for the association request frame to the second computer, and the association response frame may include the expanded working bandwidth (i.e., the target working bandwidth), thus completing the association phase. Afterwards, the first computer and the second computer perform a four-way handshake, i.e., the second computer establishes a WiFi connection with the first computer.
[0338] It should be noted that the specific implementation method of establishing a WiFi connection between the second computer and the first computer in the embodiment of the present application can be referred to S503-S510, which will not be repeated in the embodiment of the present application.
[0339] S1011 : Target data is transmitted between the first computer and the second computer using a target working bandwidth.
[0340] Since the first computer and the second computer both set the working bandwidth corresponding to the target hotspot as the target working bandwidth, the target data can be transmitted between the first computer and the second computer using the target working bandwidth.
[0341] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the first computer transmits the target data to the second computer (i.e., the data transmission operation is a data transmission operation input by the user for the target data of the first computer), the first computer may use the target working bandwidth to transmit the target data (such as a file) to the second computer.
[0342] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the second computer transmits the target data to the first computer (i.e., the data transmission operation is a data transmission operation input by the user for the target data of the second computer), the second computer may use the target working bandwidth to transmit the target data (such as a file) to the first computer.
[0343] In an embodiment of the present application, when a first computer and a second computer transmit target data, the first computer can obtain the chip type of the WiFi chip installed in the second computer. When the chip type of the WiFi chip installed in the second computer is the first type, the first computer can send an extended channel switching notification to the second computer, so that the second computer adjusts its working bandwidth as a site to the target working bandwidth indicated by the extended channel switching notification. As a result, the second computer and the first computer can use a larger target working bandwidth to transmit data, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0344] Taking the first electronic device as the second computer, the second electronic device as the first computer, and the triggering condition of the extended channel switching notification as the inconsistency between the working bandwidth of data transmission between the first computer and the second computer and the target working bandwidth indicated by the extended channel switching notification as an example, as shown in Figure 13, the data transmission method provided in this embodiment of the present application may include: S1101-S1112.
[0345] S1101: The first computer receives a data transmission operation.
[0346] A data transmission operation can be used to trigger the transmission of target data between a first computer and a second computer. The data transmission operation can be user-input. For example, when the first computer, as an access point or group owner, needs to transmit target data to the second computer, which is a site or group client, the first computer can receive the data transmission operation input by the user. The data transmission operation can also be sent by the second computer, which is a site or group client. For example, when the second computer, as a site or group client, needs to transmit target data to the first computer, which is an access point or group owner, the second computer can receive the data transmission operation input by the user, and in response, the second computer can send the data transmission operation to the first computer.
[0347] S1102: In response to the data transmission operation, the first computer creates a target hotspot.
[0348] The target hotspot can be an access point (i.e., Legacy AP), a group owner (i.e., GO), a virtual access point (i.e., SoftAP), a personal mobile hotspot, or a hotspot. After the first computer receives the data transmission operation, the first computer can create a target hotspot, that is, the first computer can serve as an access point and establish a WiFi connection with the second computer.
[0349] In some examples, because the first computer is equipped with a WiFi chip from manufacturer A, to avoid interference with other basic service sets caused by the first computer's use of adjacent secondary channels, the first computer can set a smaller initial operating bandwidth for the target hotspot when creating the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0350] S1103. The first computer sends a beacon frame to the second computer, where the beacon frame includes an initial working bandwidth corresponding to the target hotspot.
[0351] After the first computer creates a target hotspot, the first computer serving as the target hotspot (i.e., the first computer providing the WiFi hotspot function) can send a beacon frame to the second computer. This means the first computer periodically broadcasts beacon frames, enabling the second computer to establish a WiFi connection with the first computer. The beacon frame may include an initial operating bandwidth, which may be the operating bandwidth corresponding to the target hotspot set when the first computer created the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0352] S1104: The second computer receives the beacon frame sent by the first computer.
[0353] After the first computer sends a beacon frame to the second computer, the second computer receives the beacon frame sent by the first computer, that is, the second computer scans the target hotspot created by the first computer, and then the second computer can access the target hotspot created by the first computer.
[0354] S1105. The second computer accesses the target hotspot created by the first computer.
[0355] After the second computer receives the beacon frame sent by the first computer, the second computer can access the target hotspot created by the first computer, that is, the second computer establishes a WiFi connection with the first computer.
[0356] Exemplarily, the process of establishing a WiFi connection between the second computer and the first computer may include: after the second computer receives a beacon frame carrying the initial working bandwidth sent by the first computer, the second computer may send an authentication request frame to the first computer; when the first computer receives the authentication request frame sent by the second computer, the first computer may send an authentication response frame to the second computer in response to the authentication request frame, thereby completing the authentication phase. After the second computer receives the authentication response frame sent by the first computer, the second computer may send an association request frame carrying the target working bandwidth (such as 80MHz or 160MHz) to the first computer, requesting access to the target hotspot created by the first computer, and notifying the first computer that the working bandwidth of the target hotspot needs to be expanded to the target working bandwidth. When the first computer receives an association request frame carrying the target working bandwidth sent by the second computer, the first computer can expand the working bandwidth corresponding to the target hotspot from the initial working bandwidth (such as 20MHz) to the target working bandwidth (such as 80MHz or 160MHz), and send an association response frame for the association request frame to the second computer. The association response frame may include the expanded working bandwidth (i.e., the target working bandwidth), thus completing the association phase. That is, in the association phase, the second computer and the first computer negotiate the working bandwidth corresponding to the target hotspot to the target working bandwidth (such as 80MHz or 160MHz). Afterwards, the first computer and the second computer perform a four-way handshake, i.e., the second computer establishes a WiFi connection with the first computer.
[0357] It should be noted that the specific implementation method of establishing a WiFi connection between the second computer and the first computer in the embodiment of the present application can refer to the above S503-S510, which will not be repeated in the embodiment of the present application.
[0358] S1106: Data is transmitted between the first computer and the second computer.
[0359] Because the WiFi chips configured in the first computer and the WiFi chips configured in the second computer are from different manufacturers, there are certain differences in the design and architecture of the WiFi chips configured in the first computer and the second computer. Therefore, when the second computer equipped with a WiFi chip from manufacturer B transmits data with the first computer equipped with a WiFi chip from manufacturer A, they can only use the smaller initial operating bandwidth (e.g., 20MHz) initially announced by the first computer equipped with a WiFi chip from manufacturer A to transmit data. In other words, the first and second computers transmit data using the initial operating bandwidth.
[0360] In some examples, when data is transmitted between the first computer and the second computer, data frames may be used for data transmission, that is, one data frame is transmitted at a time.
[0361] S1107: The first computer determines whether the working bandwidth corresponding to the target hotspot is the target working bandwidth.
[0362] After transmitting data between the first computer and the second computer using the initial working bandwidth, the first computer can determine whether the working bandwidth corresponding to the target hotspot is the target working bandwidth. In other words, the first computer can determine whether data is being transmitted between the first computer and the second computer using the target working bandwidth. If the first computer determines that the working bandwidth corresponding to the target hotspot is not the target working bandwidth, the first computer can send an extended channel switching notification to the second computer.
[0363] In some examples, the first computer determines that the working bandwidth corresponding to the target hotspot is the target working bandwidth, and executes S1112, that is, data transmission continues between the first computer and the second computer.
[0364] S1108. The first computer sends an extended channel switching notification to the second computer. The extended channel switching notification is used to instruct the second computer to adjust the working bandwidth corresponding to the second computer as a site to the target working bandwidth.
[0365] When the first computer determines that the working bandwidth corresponding to the target hotspot is not the target working bandwidth (the initial working bandwidth is used to transmit data between the first computer and the second computer), the first computer can send an extended channel switching notification to the second computer to notify the second computer to adjust the working bandwidth corresponding to the second computer as a site to the target working bandwidth.
[0366] S1109: The second computer adjusts the working bandwidth corresponding to the second computer as a site to the target working bandwidth.
[0367] When the second computer receives the extended channel switching notification sent by the first computer, the second computer can set the working bandwidth corresponding to the target hotspot as the target working bandwidth, that is, when the second computer acts as a site (or group client), the second computer sets the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer as the target working bandwidth, that is, the second computer sets the working bandwidth of the second computer as a site to the target working bandwidth.
[0368] S1110. The first computer sets the working bandwidth corresponding to the target hotspot as the target working bandwidth.
[0369] After the first computer sends the extended channel switching notification to the second computer, the first computer can set the working bandwidth corresponding to the target hotspot as the target working bandwidth. That is, when the first computer serves as the target hotspot (such as an access point, group owner, personal mobile hotspot, virtual access point), the first computer sets the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer as the target working bandwidth, that is, the first computer sets the working bandwidth of the first computer as the target hotspot as the target working bandwidth.
[0370] It should be noted that S1110 can also be executed simultaneously with S1109, and S1110 can also be executed after S1109. The execution order of S1110 and S1109 is not specifically limited in the embodiments of the present application.
[0371] S1111. The first computer and the second computer transmit target data using a target working bandwidth.
[0372] Since the first computer and the second computer both set the working bandwidth corresponding to the target hotspot as the target working bandwidth, the target data can be transmitted between the first computer and the second computer using the target working bandwidth.
[0373] In some examples, since data transmission between the first computer and the second computer can be performed in the form of data frames, that is, one data frame is transmitted at a time, the target data transmission between the first computer and the second computer using the target working bandwidth can include: for the first computer and the second computer, setting the working bandwidth corresponding to the target hotspot to the target working bandwidth, and transmitting the target data using the target working bandwidth.
[0374] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the first computer transmits the target data to the second computer (i.e., the data transmission operation is a data transmission operation input by the user for the first computer), the first computer may use the target working bandwidth to transmit the target data (such as a file) to the second computer.
[0375] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the second computer transmits the target data to the first computer (i.e., the data transmission operation is a data transmission operation input by the user for the second computer), the second computer may use the target working bandwidth to transmit the target data (such as a file) to the first computer.
[0376] In an embodiment of the present application, when a first computer and a second computer transmit target data, the first computer determines whether the working bandwidth corresponding to the target hotspot is consistent with the target working bandwidth. If the working bandwidth corresponding to the target hotspot is determined to be inconsistent with the target working bandwidth, the first computer can send an extended channel switching notification to the second computer, so that the second computer adjusts its working bandwidth as a site to the target working bandwidth indicated by the extended channel switching notification. Then, a larger target working bandwidth can be used to transmit data between the second computer and the first computer, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0377] In some examples, when the management frame notification is an operating mode notification (i.e., OMN), the first electronic device may send an operating mode notification to the second electronic device to notify the second electronic device to adjust the operating bandwidth corresponding to the target hotspot to the target operating bandwidth indicated by the extended channel switching notification. The first electronic device may be an electronic device serving as the target hotspot (i.e., an access point or group owner) or an electronic device serving as a site (or group client).
[0378] There are two triggering conditions for the first electronic device to send an operating mode notification to the second electronic device. One of these conditions is that the WiFi chip type of the electronic device acting as the station in the first and second electronic devices is the first type; the other condition is that the operating bandwidth for data transmission between the first and second electronic devices is inconsistent with the target operating bandwidth indicated in the extended channel switching notification.
[0379] Taking the first electronic device as the second computer, the second electronic device as the first computer, the second computer sending a working mode notification to the first computer, and the triggering condition of the working mode notification being that the working bandwidth for transmitting data between the first computer and the second computer is inconsistent with the target working bandwidth indicated by the extended channel switching notification as an example, as shown in Figure 14, the data transmission method provided in this embodiment of the present application may include: S1201-S1212.
[0380] S1201: The first computer receives a data transmission operation.
[0381] A data transmission operation can be used to trigger the transmission of target data between a first computer and a second computer. The data transmission operation can be user-input. For example, when the first computer, as an access point or group owner, needs to transmit target data to the second computer, which is a site or group client, the first computer can receive the data transmission operation input by the user. The data transmission operation can also be sent by the second computer, which is a site or group client. For example, when the second computer, as a site or group client, needs to transmit target data to the first computer, which is an access point or group owner, the second computer can receive the data transmission operation input by the user, and in response, the second computer can send the data transmission operation to the first computer.
[0382] S1202: In response to the data transmission operation, the first computer creates a target hotspot.
[0383] The target hotspot can be an access point (i.e., Legacy AP), a group owner (i.e., GO), a virtual access point (i.e., SoftAP), a personal mobile hotspot, or a hotspot. After the first computer receives the data transmission operation, the first computer can create a target hotspot, that is, the first computer can serve as an access point and establish a WiFi connection with the second computer.
[0384] In some examples, because the first computer is equipped with a WiFi chip from manufacturer A, to avoid interference with other basic service sets caused by the first computer's use of adjacent secondary channels, the first computer can set a smaller initial operating bandwidth for the target hotspot when creating the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0385] S1203: The first computer sends a beacon frame to the second computer, where the beacon frame includes an initial working bandwidth corresponding to the target hotspot.
[0386] After the first computer creates a target hotspot, the first computer serving as the target hotspot (i.e., the first computer providing the WiFi hotspot function) can send a beacon frame to the second computer. This means the first computer periodically broadcasts beacon frames, enabling the second computer to establish a WiFi connection with the first computer. The beacon frame may include an initial operating bandwidth, which may be the operating bandwidth corresponding to the target hotspot set when the first computer created the target hotspot. For example, the initial operating bandwidth is 20 MHz.
[0387] S1204: The second computer receives the beacon frame sent by the first computer.
[0388] After the first computer sends a beacon frame to the second computer, the second computer receives the beacon frame sent by the first computer, that is, the second computer scans the target hotspot created by the first computer, and then the second computer can access the target hotspot created by the first computer.
[0389] S1205. The second computer accesses the target hotspot created by the first computer.
[0390] After the second computer receives the beacon frame sent by the first computer, the second computer can access the target hotspot created by the first computer, that is, the second computer establishes a WiFi connection with the first computer.
[0391] It should be noted that the specific implementation method of establishing a WiFi connection between the second computer and the first computer in the embodiment of the present application can refer to the above S1105 or the above S503-S510, which will not be repeated in the embodiment of the present application.
[0392] S1206: Data is transmitted between the first computer and the second computer.
[0393] Because the WiFi chips configured in the first computer and the second computer are from different manufacturers, there are certain differences in the design and architecture of the WiFi chips configured in the first computer and the WiFi chips configured in the second computer. Therefore, when the second computer equipped with the WiFi chip of manufacturer B transmits data with the first computer equipped with the WiFi chip of manufacturer A, they can only use the smaller initial operating bandwidth (such as 20MHz) initially announced by the first computer equipped with the WiFi chip of manufacturer A to transmit data. In other words, the first and second computers use the initial operating bandwidth to transmit data.
[0394] In some examples, when data is transmitted between the first computer and the second computer, data frames may be used for data transmission, that is, one data frame is transmitted at a time.
[0395] S1207: The second computer determines whether the working bandwidth corresponding to the target hotspot is the target working bandwidth.
[0396] After the first and second computers use the initial working bandwidth to transmit data, the second computer can determine whether the working bandwidth corresponding to the target hotspot is the target working bandwidth. Specifically, the second computer can determine whether the first and second computers use the target working bandwidth for data transmission. If the second computer determines that the working bandwidth corresponding to the target hotspot is not the target working bandwidth, the second computer can send an operating mode notification to the first computer.
[0397] In some examples, the second computer determines that the working bandwidth corresponding to the target hotspot is the target working bandwidth, and executes S1212, that is, the data transmission between the first computer and the second computer continues.
[0398] S1208. The second computer sends a working mode notification to the first computer, where the working mode notification is used to instruct the first computer to expand the working bandwidth corresponding to the target hotspot to the target working bandwidth.
[0399] When the second computer determines that the working bandwidth corresponding to the target hotspot is not the target working bandwidth (the initial working bandwidth is used to transmit data between the first computer and the second computer), the second computer can send a working mode notification to the first computer to notify the first computer to set the working bandwidth corresponding to the target hotspot to the target working bandwidth.
[0400] S1209: The first computer sets the working bandwidth corresponding to the target hotspot as the target working bandwidth.
[0401] When the first computer receives the working mode notification sent by the second computer, the first computer can set the working bandwidth corresponding to the target hotspot as the target working bandwidth, that is, when the first computer serves as the target hotspot (such as an access point, group owner, personal mobile hotspot, virtual access point), the first computer sets the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer as the target working bandwidth, that is, the first computer sets the working bandwidth of the first computer as the target hotspot as the target working bandwidth.
[0402] S1210: The second computer adjusts the working bandwidth corresponding to the second computer as a site to the target working bandwidth.
[0403] After the second computer sends a working mode notification to the first computer, the second computer can set the working bandwidth corresponding to the target hotspot as the target working bandwidth. That is, when the second computer acts as a site (or group client), the second computer sets the working bandwidth corresponding to the WiFi connection established between the second computer and the first computer as the target working bandwidth, that is, the second computer sets the working bandwidth of the second computer as a site to the target working bandwidth.
[0404] It should be noted that S1210 can also be executed simultaneously with S1209, and S1210 can also be executed after S1209. The execution order of S1210 and S1209 is not specifically limited in the embodiment of the present application.
[0405] S1211 : The first computer and the second computer transmit target data using the target working bandwidth.
[0406] Since the first computer and the second computer both set the working bandwidth corresponding to the target hotspot as the target working bandwidth, the target data can be transmitted between the first computer and the second computer using the target working bandwidth.
[0407] In some examples, since data transmission between the first computer and the second computer can be performed in the form of data frames, that is, one data frame is transmitted at a time, the target data transmission between the first computer and the second computer using the target working bandwidth can include: for the first computer and the second computer, setting the working bandwidth corresponding to the target hotspot to the target working bandwidth, and transmitting the target data using the target working bandwidth.
[0408] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the first computer transmits the target data to the second computer (i.e., the data transmission operation is a data transmission operation input by the user for the first computer), the first computer may use the target working bandwidth to transmit the target data (such as a file) to the second computer.
[0409] In some examples, the target data transmission between the first computer and the second computer using the target working bandwidth may include: when the second computer transmits the target data to the first computer (i.e., the data transmission operation is a data transmission operation input by the user for the second computer), the second computer may use the target working bandwidth to transmit the target data (such as a file) to the first computer.
[0410] In an embodiment of the present application, when a first computer and a second computer transmit target data, the second computer determines whether the working bandwidth corresponding to the target hotspot is consistent with the target working bandwidth. If the working bandwidth corresponding to the target hotspot is determined to be inconsistent with the target working bandwidth, the second computer can send a working mode notification to the first computer, so that the first computer adjusts the working bandwidth corresponding to the target hotspot to the target working bandwidth indicated by the working mode notification. Then, a larger target working bandwidth can be used to transmit data between the second computer and the first computer, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0411] For ease of understanding, the data transmission method provided in the embodiments of the present application is described below with reference to the accompanying drawings.
[0412] The data transmission method provided in the embodiment of the present application is described below with reference to FIG15. The data transmission method is applied to a first electronic device. As shown in FIG15, the data transmission method may include the following S1301-S1304.
[0413] S1301. In response to a first operation, the first electronic device obtains first information; wherein the first operation is used to trigger the first electronic device to send first data to be transmitted to the second electronic device, or to trigger the second electronic device to send first data to the first electronic device.
[0414] In some examples, the first operation can be used to trigger the first electronic device to send the first data to be transmitted to the second electronic device, that is, when the first electronic device receives the first operation input by the user on the first electronic device, the first electronic device obtains the first information in response to the first operation. In some examples, the first operation can be used to trigger the second electronic device to send the first data to be transmitted to the first electronic device, that is, when the second electronic device receives the first operation input by the user on the second electronic device, the second electronic device can send an instruction corresponding to the first operation to the first electronic device, and the first electronic device obtains the first information in response to the instruction corresponding to the first operation.
[0415] Exemplarily, the first operation can be used to trigger the first electronic device and the second electronic device to perform a device cloning operation, can also be used to trigger the first electronic device and the second electronic device to perform a data migration operation, and can also be used to trigger the first electronic device and the second electronic device to perform a file sharing operation.
[0416] Specifically, in the embodiment of the present application, the first operation may be the data transmission operation in S1001, S1101, or S1201. In the embodiment of the present application, the first data may be the target data in S1011, S1111, or S1211.
[0417] The above-mentioned first electronic device can determine whether to send the first notification to the second electronic device based on the first information. In some examples, the first information may include the chip type of the WiFi chip configured as the electronic device of the third role, wherein the third role is a site or group client. For example, when the first electronic device acts as a site or a group client (that is, the first role is the third role), the first information may include the chip type of the WiFi chip configured by the first electronic device. For another example, when the second electronic device acts as a site or a group client (that is, the second role is the third role), the first information may include the chip type of the WiFi chip configured by the second electronic device.
[0418] In some examples, the first information may also include a second operating bandwidth for transmitting data between the first electronic device and the second electronic device.
[0419] The first electronic device can serve as a first role, and the second electronic device can serve as a second role. The second role is a role that is in a relative relationship with the first role.
[0420] In some examples, the first role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot, and the second role is one of a site or a group client. That is, the first electronic device can act as a site or a group client to create an access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot, and the second electronic device can act as a site or a group client to access the access point, group owner, personal mobile hotspot, virtual access point, or hotspot created by the first electronic device.
[0421] In some examples, the first role is a role in a site or group client, and the second role is a role in an access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot. That is, the second electronic device can act as a creation access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot, and the first electronic device can act as a site or group client to access the access point, group owner, personal mobile hotspot, virtual access point, or hotspot created by the second electronic device.
[0422] Specifically, in the embodiment of the present application, the first role may be the target hotspot in the above-mentioned S1002, or the above-mentioned S1102, or the above-mentioned S1202.
[0423] In some examples, when the first role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and the first information may be the chip type of a WiFi chip configured for an electronic device as a third role, in response to a first operation, the first electronic device obtains the first information, which may include: in response to the first operation, the first electronic device creates the first role; the first electronic device receives a probe request frame sent by the second electronic device including the chip type of the WiFi chip configured for the second electronic device.
[0424] In some examples, when the first role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and the first information may be a second working bandwidth for transmitting data between the first electronic device and the second electronic device, in response to the first operation, the first electronic device obtains the first information, which may include: in response to the first operation, the first electronic device creates the first role; the first electronic device establishes a WiFi connection with the second electronic device; data is transmitted between the first electronic device and the second electronic device; the first electronic device obtains the second working bandwidth for transmitting data between the first electronic device and the second electronic device.
[0425] In some examples, when the first role is a site or group client and the first information may be a second working bandwidth for transmitting data between the first electronic device and the second electronic device, in response to the first operation, the first electronic device obtains the first information, which may include: in response to the first operation, the first electronic device creates the first role; the first electronic device establishes a WiFi connection with the second electronic device; data is transmitted between the first electronic device and the second electronic device; and the second electronic device obtains the second working bandwidth for transmitting data between the first electronic device and the second electronic device.
[0426] Specifically, the specific implementation method of the first electronic device obtaining the first information in the embodiment of the present application can refer to the above S1002-S1006, or the above S1102-S1107, and the target hotspot in the above S1202-S1207, which will not be repeated in the embodiment of the present application.
[0427] S1302. When the first information meets a preset condition, the first electronic device sends a first notification to the second electronic device in the first role, so that the second electronic device adjusts the working bandwidth of the second electronic device as the second role to the first working bandwidth indicated by the first notification, and the second role is a role that is relative to the first role.
[0428] In some examples, the first notification is used to instruct the second electronic device to adjust the operating bandwidth corresponding to the second electronic device as the second role to the first operating bandwidth. The first notification includes an extended channel switching notification and an operating mode notification. Specifically, the first notification is the management frame notification in the above embodiment. The first operating bandwidth can be the target operating bandwidth in S1007, S1108, or S1208.
[0429] In some examples, the first information meeting a preset condition may include: the chip type of the WiFi chip configured in the electronic device as the third role is a preset type. The chip type of the WiFi chip may refer to the manufacturer of the WiFi chip. The preset type may be used to indicate the WiFi chip of the target manufacturer (i.e., the WiFi chip of manufacturer B). Specifically, the preset type may be the first type in S1007, S1108, or S1208.
[0430] In some examples, the first information satisfies a preset condition, which may include: the second working bandwidth is inconsistent with the first working bandwidth.
[0431] In some examples, when the first role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and the second role is one of a site or a group client, the first electronic device sends a first notification to the second electronic device in the first role, which may include: the first electronic device sends an extended channel switching notification or a working mode notification to the second electronic device in the first role.
[0432] In some examples, when the first role is a site or a group client, and the second role is an access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot, the first electronic device sends a first notification to the second electronic device in the first role, which may include: the first electronic device sends a working mode notification to the second electronic device in the first role.
[0433] Specifically, the specific implementation method of the first electronic device sending the first notification to the second electronic device in the embodiment of the present application as the first role can refer to the above S1007, or refer to the above S1108, or refer to the target hotspot in the above S1208, which will not be repeated in the embodiment of the present application.
[0434] In some examples, the first information satisfies the preset condition that the second working bandwidth is inconsistent with the first working bandwidth. Before the first electronic device obtains the first information in response to the first operation, the above-mentioned data transmission method may also include: the first electronic device transmits the first data to the second electronic device based on the first WiFi connection using the second working bandwidth, and the second working bandwidth is smaller than the first working bandwidth; the first electronic device transmits the first data to the second electronic device based on the first WiFi connection using the first working bandwidth, which may include: the first electronic device transmits the second data to the second electronic device based on the first WiFi connection using the first working bandwidth, wherein the second data is the remaining data in the first data except the data transmitted to the second electronic device using the second working bandwidth.
[0435] Specifically, in the embodiment of the present application, the first electronic device transmits the first data to the second electronic device using the second working bandwidth based on the first WiFi connection. The specific implementation method of the second working bandwidth being smaller than the first working bandwidth can refer to the above S1103-S1106, or refer to the above S1203-S1206, which will not be repeated in the embodiment of the present application.
[0436] S1303: The first electronic device adjusts the working bandwidth corresponding to the first role of the first electronic device to the first working bandwidth.
[0437] After the first electronic device sends the first notification to the second electronic device, the first electronic device adjusts the working bandwidth corresponding to the first role of the first electronic device to the first working bandwidth, that is, the first electronic device sets the working bandwidth corresponding to the WiFi connection established between the second electronic device and the first electronic device to the first working bandwidth.
[0438] Specifically, in the embodiment of the present application, the specific implementation method of the first electronic device adjusting the working bandwidth corresponding to the first electronic device as the first role to the first working bandwidth can refer to the above S1009, or refer to the above S1109, or refer to the above S1209 for a specific implementation method, which will not be repeated in the embodiment of the present application.
[0439] S1304: The first electronic device transmits first data to the second electronic device using the first working bandwidth based on the first WiFi connection, wherein the first WiFi connection is a WiFi connection established between the first electronic device as the first role and the second electronic device as the second role.
[0440] Since the first electronic device adjusts the working bandwidth corresponding to the first role of the first electronic device to the first working bandwidth, and the working bandwidth of the second electronic device as the second role is adjusted to the first working bandwidth indicated by the first notification, the first data can be transmitted between the first electronic device and the second electronic device using the first working bandwidth.
[0441] In some examples, the first electronic device transmits the first data to the second electronic device using the first working bandwidth based on the first WiFi connection, which may include: when the first electronic device transmits the first data to the second electronic device, the first electronic device may use the first working bandwidth to transmit the first data (such as a file) to the second electronic device.
[0442] In some examples, the first electronic device transmits the first data to the second electronic device based on the first WiFi connection using the first working bandwidth, which may include: when the second electronic device transmits the first data to the first electronic device, the second electronic device may transmit the first data (such as a file) to the first electronic device using the first working bandwidth.
[0443] Specifically, in the embodiment of the present application, the specific implementation method of the first electronic device adjusting the working bandwidth corresponding to the first electronic device as the first role to the first working bandwidth can refer to the above S1009, or refer to the above S1109, or refer to the above S1209 for a specific implementation method, which will not be repeated in the embodiment of the present application.
[0444] In an embodiment of the present application, when a first electronic device transmits data with a second electronic device, the first electronic device can obtain first information. If the first information meets a preset condition, the first electronic device can send a first notification to the second electronic device, so that the second electronic device adjusts its working bandwidth as a second role to the first working bandwidth indicated by the first notification. In addition, the first electronic device can also adjust its working bandwidth as a first role to the first working bandwidth, so that the second electronic device and the first electronic device can use a larger first working bandwidth to transmit data, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0445] The data transmission method provided in the embodiment of the present application is described below with reference to FIG16. The data transmission method is applied to a first electronic device. As shown in FIG16, the data transmission method may include the following S1401-S1404.
[0446] S1401: When a first electronic device transmits first data to a second electronic device, the first electronic device, as a third role, establishes a first WiFi connection with a second electronic device, as a fourth role. The working bandwidth corresponding to the first WiFi connection is a second working bandwidth.
[0447] The first data is data to be transmitted sent by the first electronic device to the second electronic device, or the first data is data to be transmitted sent by the second electronic device to the first electronic device. Specifically, the first data may be the target data in S901 above.
[0448] In some examples, the third role is a role in a site or group client, and the fourth role is a role in an access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot. That is, the second electronic device can act as a creation access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot, and the first electronic device can act as a site or group client to access the access point, group owner, personal mobile hotspot, virtual access point, or hotspot created by the first electronic device.
[0449] In some examples, the first electronic device, as the third role, establishing a first WiFi connection with the second electronic device, as the fourth role, may include: upon the first electronic device receiving a first beacon frame sent by the second electronic device, the first electronic device, as the third role, establishing the first WiFi connection with the second electronic device, as the fourth role. Upon the second electronic device receiving the first operation, the second electronic device creates the third role and sends the first beacon frame to the first electronic device.
[0450] The first operation is used to trigger the first electronic device to send first data to be transmitted to the second electronic device, or to trigger the second electronic device to send first data to the first electronic device.
[0451] The first beacon frame may include a second operating bandwidth. The second operating bandwidth may be the operating bandwidth set for the third role when the second electronic device creates the third role. For example, the second operating bandwidth is 20 MHz. Specifically, the second operating bandwidth may be the initial operating bandwidth in S903 above.
[0452] Specifically, in the embodiment of the present application, the first electronic device acts as the third role and establishes a first WiFi connection with the second electronic device acts as the fourth role. The specific implementation method of the working bandwidth corresponding to the first WiFi connection is the second working bandwidth. Please refer to the specific implementation method of S901-S904 above, and this will not be repeated in the embodiment of the present application.
[0453] S1402. When the second working bandwidth is inconsistent with the first working bandwidth, the first electronic device sends a second notification to the second electronic device, where the second notification is used to instruct the first electronic device to disconnect from the second electronic device and re-establish a WiFi connection; wherein the first working bandwidth is the working bandwidth obtained through negotiation between the first electronic device and the second electronic device, and the first working bandwidth is greater than the second working bandwidth.
[0454] In some examples, the first electronic device sending a second notification to the second electronic device may include: the first electronic device obtaining the data volume corresponding to the first data; when the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device sending the second notification to the second electronic device.
[0455] Specifically, the second notification may be the reconnection notification in S906 above. The first working bandwidth may be the target working bandwidth in S904 above.
[0456] Specifically, the specific implementation method of the first electronic device sending the second notification to the second electronic device in the embodiment of the present application can refer to the specific implementation method of S905 and S906 above, which will not be repeated in the embodiment of the present application.
[0457] S1403: The first electronic device, as the third role, establishes a second WiFi connection with the second electronic device, as the fourth role. The working bandwidth corresponding to the second WiFi connection is the first working bandwidth.
[0458] In some examples, the first electronic device, as a third role, establishes a second WiFi connection with the second electronic device, as a fourth role, which may include: the first electronic device sends a first request to the second electronic device; when the first electronic device receives a first response to the first request sent by the second electronic device, the first electronic device, as the third role, establishes a second WiFi connection with the second electronic device, as the fourth role.
[0459] Specifically, the first request may be the deauthentication request frame in S907 , and the first response may be the confirmation frame in S908 .
[0460] Specifically, in the embodiment of the present application, the specific implementation method of the first electronic device as the third role establishing the second WiFi connection with the second electronic device as the fourth role can refer to the specific implementation method of S907 and S910 above, which will not be repeated in the embodiment of the present application.
[0461] S1404: The first electronic device transmits the first data to the second electronic device using the first working bandwidth based on the second WiFi connection.
[0462] In some examples, the first electronic device transmits the first data to the second electronic device using the first working bandwidth based on the second WiFi connection, which may include: when the first electronic device transmits the first data to the second electronic device, the first electronic device may use the first working bandwidth to transmit the first data (such as a file) to the second electronic device.
[0463] In some examples, the first electronic device transmits the first data to the second electronic device using the first working bandwidth based on the second WiFi connection, which may include: when the second electronic device transmits the first data to the first electronic device, the second electronic device may use the first working bandwidth to transmit the first data (such as a file) to the first electronic device.
[0464] Specifically, in the embodiment of the present application, the specific implementation method of the first electronic device transmitting the first data to the second electronic device using the first working bandwidth based on the second WiFi connection can refer to the specific implementation method of S911 above, and will not be repeated in the embodiment of the present application.
[0465] In an embodiment of the present application, when a first electronic device transmits data to a second electronic device, the first electronic device, as a third role, can establish a first WiFi connection with the first electronic device, as a fourth role. Afterwards, when the second working bandwidth corresponding to the first WiFi connection is inconsistent with the first working bandwidth, the first electronic device can send a second notification to the second electronic device to notify the second electronic device that the first electronic device will disconnect from the second electronic device and re-establish a second WiFi connection. Among them, the working bandwidth corresponding to the second WiFi connection is the first working bandwidth, and then the first electronic device and the second electronic device can use the larger first working bandwidth to transmit the first data, which can improve the data transmission rate, shorten the data transmission time, and enhance the user experience.
[0466] The data transmission method provided in the embodiment of the present application is described below with reference to FIG17. The data transmission method is applied to a first electronic device. As shown in FIG17, the data transmission method may include the following S1501-S1504.
[0467] S1501. The first electronic device receives second information sent by the second electronic device, where the second information includes identification information and a first working bandwidth corresponding to a fifth role created by the second electronic device; wherein the fifth role is a role created by the second electronic device when the second electronic device receives a first operation; and the first operation is used to trigger the first electronic device to send first data to be transmitted to the second electronic device, or to trigger the second electronic device to send first data to the first electronic device.
[0468] The second electronic device can serve as a fifth role, and the first electronic device can serve as a sixth role. The sixth role is a role that is in a relative relationship with the fifth role.
[0469] In some examples, the fifth role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot, and the sixth role is one of a site or a group client. That is, the second electronic device can act as a site or a group client to create an access point, a group owner, a personal mobile hotspot, a virtual access point, or a hotspot, and the first electronic device can act as a site or a group client to access the access point, group owner, personal mobile hotspot, virtual access point, or hotspot created by the second electronic device.
[0470] The above-mentioned second information may include identification information and a first working bandwidth corresponding to the fifth role created by the second electronic device. The first working bandwidth may be the maximum working bandwidth supported by the fifth role created by the second electronic device. For example, the first working bandwidth is 80MHz or 160MHz. Specifically, the second information may be the information of the target hotspot in S603 above. The identification information corresponding to the fifth role may be the identifier of the target hotspot in S603 above. The first working bandwidth may be the maximum working bandwidth corresponding to the target hotspot in S603 above.
[0471] In this embodiment of the present application, the fifth role is a role created by the second electronic device upon receiving the first operation; the first operation is used to trigger the first electronic device to send first data to the second electronic device, or to trigger the second electronic device to send first data to the first electronic device. In other words, when the second electronic device receives the first operation, in response to the first operation, the second electronic device creates the fifth role and sends the second information to the first electronic device.
[0472] Specifically, the specific implementation method of the first electronic device receiving the second information sent by the second electronic device in the embodiment of the present application can refer to the specific implementation method of S601-S604 above, which will not be repeated in the embodiment of the present application.
[0473] S1502. When the first electronic device scans the first access point in the sixth role and the identification information corresponding to the first access point matches the identification information corresponding to the fifth role, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, where the sixth role is a role that is relative to the fifth role.
[0474] In some examples, the first electronic device can set a filtering condition based on the second information, where the filtering condition includes a target identifier and a target working bandwidth. The target identifier can be used to determine whether the first access point scanned by the first electronic device is an access point created by the second electronic device (i.e., the fifth role). Exemplarily, the first electronic device setting the filtering condition may include: the first electronic device determining the identification information corresponding to the fifth role as the target identifier; and the first electronic device determining the first working bandwidth as the target working bandwidth.
[0475] Afterwards, after the first electronic device determines the identification information corresponding to the scanned first access point, the first electronic device may determine the identification information corresponding to the scanned first access point and compare the identification information corresponding to the first access point with the target identification in the filtering condition. If the identification information corresponding to the first access point scanned by the first electronic device matches the target identification in the filtering condition, it indicates that the first access point scanned by the first electronic device can support the target operating bandwidth in the filtering condition. Therefore, the first electronic device may adjust the operating bandwidth of the first electronic device as the sixth role to the target operating bandwidth (i.e., the first operating bandwidth).
[0476] Specifically, the first access point may be the hotspot scanned in S609. The identification information corresponding to the first access point may be the identification corresponding to the hotspot scanned in S609. The first operating bandwidth may be the maximum operating bandwidth corresponding to the target hotspot in S603.
[0477] Specifically, in an embodiment of the present application, when the first electronic device scans the first access point in the sixth role and the identification information corresponding to the first access point matches the identification information corresponding to the fifth role, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth. For the specific implementation method, please refer to the specific implementation method of S609 above, which will not be repeated in the embodiment of the present application.
[0478] In some examples, the first electronic device is configured with a first WiFi chip. Before the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, the data transmission method may further include: the first electronic device obtains the chip type of the first WiFi chip; the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, which may include: when the chip type of the first WiFi chip is a preset type, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth.
[0479] In some examples, after the first electronic device obtains the chip type of the first WiFi chip, the above-mentioned data transmission method may further include: the first electronic device obtains the data volume corresponding to the first data; the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, which may include: when the chip type of the first WiFi chip is a preset type and the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth.
[0480] Specifically, in an embodiment of the present application, when the first electronic device scans the first access point in the sixth role and the identification information corresponding to the first access point matches the identification information corresponding to the fifth role, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth. For the specific implementation method, please refer to the above-mentioned S605-S609, which will not be repeated in the embodiment of the present application.
[0481] S1503: The first electronic device, as the sixth role, establishes a WiFi connection with the second electronic device, as the fifth role.
[0482] The process of the first electronic device, as the sixth role, establishing a WiFi connection with the second electronic device, as the fifth role, may include four stages: scanning, authentication, connection, and four-way handshake.
[0483] Specifically, in the embodiment of the present application, the specific implementation method of the first electronic device as the sixth role establishing a WiFi connection with the second electronic device as the fifth role can refer to the specific implementation method of S610-S615 above, which will not be repeated in the embodiment of the present application.
[0484] S1504: The first electronic device transmits first data to the second electronic device using the first working bandwidth based on the WiFi connection.
[0485] In some examples, a first electronic device transmits first data to a second electronic device using a first working bandwidth based on a WiFi connection, which may include: when the first electronic device transmits the first data to the second electronic device, the first electronic device may use the target working bandwidth (i.e., the first working bandwidth) to transmit the first data (such as a file) to the second electronic device.
[0486] In some examples, the first electronic device transmits the first data to the second electronic device based on a WiFi connection using the first working bandwidth, which may include: when the second electronic device transmits the first data to the first electronic device, the second electronic device may use the target working bandwidth (i.e., the first working bandwidth) to transmit the first data (such as a file) to the first (i.e., the first working bandwidth).
[0487] In an embodiment of the present application, when a first electronic device transmits first data to a second electronic device, the first electronic device, acting as a sixth role, can set filtering conditions based on second information sent by the second electronic device, acting as a fifth role. The first electronic device can then adjust the operating bandwidth of the first electronic device, acting as the sixth role, to a target operating bandwidth based on the filtering conditions. The first data can then be transmitted between the first and second electronic devices using the target operating bandwidth, thereby increasing the data transmission rate, shortening the data transmission time, and improving the user experience.
[0488] The data transmission method provided in the embodiment of the present application is described below with reference to FIG18. The data transmission method is applied to a first electronic device. As shown in FIG18, the data transmission method may include the following S1601-S1604.
[0489] S1601: When a first electronic device transmits first data to a second electronic device, the first electronic device obtains a working frequency band corresponding to a seventh role created by the second electronic device.
[0490] The first electronic device may be a terminal device (such as a mobile phone).
[0491] The first data is data to be transmitted sent by the first electronic device to the second electronic device, or the first data is data to be transmitted sent by the second electronic device to the first electronic device. Specifically, the first data may be the target data in S812 above.
[0492] In some examples, the second electronic device acts as a seventh role, and the first electronic device acts as an eighth role. The seventh role is one of access point, group owner, personal mobile hotspot, virtual access point, and hotspot, and the eighth role is one of site or group client. That is, the second electronic device can act as a creation access point, group owner, personal mobile hotspot, virtual access point, or hotspot, and the first electronic device can act as a site or group client to access the access point, group owner, personal mobile hotspot, virtual access point, or hotspot created by the first electronic device.
[0493] In this embodiment of the present application, the seventh role is a role created by the second electronic device upon receiving a first operation; the first operation is used to trigger the first electronic device to send first data to be transmitted to the second electronic device, or to trigger the second electronic device to send first data to the first electronic device. In other words, when the second electronic device receives the first operation, in response to the first operation, the second electronic device creates the seventh role and sends the second information to the first electronic device.
[0494] Specifically, in the embodiment of the present application, the second electronic device receives the first operation, responds to the first operation, creates the seventh role, and sends the second information to the first electronic device. For the specific implementation method, please refer to the above-mentioned S801-S802, which will not be repeated in the embodiment of the present application.
[0495] In some examples, the first electronic device obtains the working frequency band corresponding to the seventh role created by the second electronic device, which may include: the first electronic device obtains the data volume corresponding to the first data; when the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device obtains the working frequency band corresponding to the seventh role created by the second electronic device.
[0496] Specifically, the specific implementation method of the first electronic device obtaining the working frequency band corresponding to the seventh role created by the second electronic device in the embodiment of the present application can refer to the specific implementation method of S803-S804 above, which will not be repeated in the embodiment of the present application.
[0497] S1602: When the working frequency band corresponding to the seventh role is a preset frequency band, the first electronic device adjusts the working bandwidth of the first electronic device as the eighth role to the first working bandwidth.
[0498] The preset frequency band may be a frequency band that supports a larger working bandwidth. For example, the preset frequency band may be a 5 GHz frequency band or a 6 GHz frequency band. The first working bandwidth is the maximum working bandwidth supported by the second electronic device when the second electronic device creates a seventh role corresponding to the preset frequency band. For example, the first working bandwidth may be 80 MHz or 160 MHz. Specifically, the preset frequency band may be the first frequency band in S805 above, and the first working bandwidth may be the target working bandwidth in S805 above.
[0499] In some examples, the first electronic device adjusting the operating bandwidth of the first electronic device as the eighth role to the first operating bandwidth may include the first electronic device writing the first operating bandwidth into firmware of a WiFi chip configured in the first electronic device.
[0500] Specifically, in the embodiment of the present application, the specific implementation method of the first electronic device adjusting the working bandwidth of the first electronic device as the eighth role to the first working bandwidth can refer to the specific implementation method of the above S805, which will not be repeated in the embodiment of the present application.
[0501] S1603: The first electronic device, as the eighth role, establishes a WiFi connection with the second electronic device, as the seventh role.
[0502] In some examples, the first electronic device, as the eighth role, establishes a WiFi connection with the second electronic device, as the seventh role, which may include: the first electronic device, as the eighth role, sends a second request to the second electronic device, the second request including a first working bandwidth; the first electronic device receives a second response corresponding to the second request sent by the second electronic device; the above-mentioned first electronic device transmits the first data with the second electronic device based on the WiFi connection using the first working bandwidth, which may include: when the second response indicates that the second electronic device supports the first working bandwidth, the first electronic device transmits the first data with the second electronic device based on the WiFi connection using the first working bandwidth.
[0503] In some examples, after the first electronic device receives the second response corresponding to the second request sent by the second electronic device, the above-mentioned data transmission method may also include: when the second response indicates that the second electronic device does not support the first working bandwidth, the first electronic device adjusts the working bandwidth of the first electronic device as the eighth role to the third working bandwidth indicated by the second response, and the third working bandwidth is smaller than the first working bandwidth; the first electronic device transmits the first data to the second electronic device based on the WiFi connection using the third working bandwidth.
[0504] In some examples, the third operating bandwidth is greater than the fourth operating bandwidth, wherein the fourth operating bandwidth is the operating bandwidth set for the seventh role when the second electronic device creates the seventh role.
[0505] Specifically, in the embodiment of the present application, the specific implementation method of the first electronic device as the eighth role establishing a WiFi connection with the second electronic device as the seventh role can refer to the specific implementation method of S806-S811 above, which will not be repeated in the embodiment of the present application.
[0506] S1604: The first electronic device transmits first data to the second electronic device using the first working bandwidth based on the WiFi connection.
[0507] Specifically, in the embodiment of the present application, the specific implementation method of the first electronic device transmitting the first data to the second electronic device based on the WiFi connection using the first working bandwidth can refer to the specific implementation method of the above S812, which will not be repeated in the embodiment of the present application.
[0508] In an embodiment of the present application, when the first electronic device is a terminal device, the first electronic device does not provide a method for setting the working bandwidth supported by the WiFi chip carried by the first electronic device. Therefore, when the first electronic device and the second electronic device transmit the first data, the first electronic device, as the eighth role, can obtain the working frequency band corresponding to the seventh role created by the second electronic device. Thereafter, when the working frequency band corresponding to the seventh role created by the second electronic device is a preset frequency band, the first electronic device can adjust the working bandwidth supported by the WiFi chip carried by it to the maximum working bandwidth corresponding to the preset frequency band (i.e., the first working bandwidth), and then the first electronic device and the second electronic device can use the target working bandwidth to transmit the first data, which can improve the data transmission rate, shorten the data transmission time, and thus improve the user experience.
[0509] In the solution of the present application, when a first electronic device and a second electronic device transmit target data, the first electronic device, as a site (or group client), can set filtering conditions based on the information of the target hotspot created by the second electronic device as the target hotspot (i.e., the access point or group owner). Afterwards, the first electronic device can adjust the working bandwidth of the first electronic device as a site (or group client) to the target working bandwidth based on the filtering conditions, and then the target working bandwidth can be used to transmit the target data between the first electronic device and the second electronic device, thereby improving the data transmission rate, shortening the data transmission time, and thus realizing the rapid transmission of large files, improving the user experience.
[0510] Furthermore, when the first electronic device is a terminal device, the first electronic device does not provide a working bandwidth that can be used to set the WiFi chip carried by the first electronic device. Therefore, when the first electronic device and the second electronic device transmit target data, the first electronic device, as a site (or group client), can obtain the working frequency band corresponding to the target hotspot (i.e., access point or group owner) created by the second electronic device. Afterwards, when the working frequency band corresponding to the access point (or group owner) created by the second electronic device is the target frequency band, the first electronic device can adjust the working bandwidth supported by the WiFi chip it carries to the maximum working bandwidth corresponding to the target frequency band (i.e., target working bandwidth), and then the target working bandwidth can be used to transmit target data between the first electronic device and the second electronic device, thereby improving the data transmission rate, shortening the data transmission time, and realizing the rapid transmission of large files, thereby improving the user experience.
[0511] In addition, when the first electronic device transmits target data with the second electronic device, the first electronic device, as a site (or group client), can establish a WiFi connection with the second electronic device, which is the target hotspot (i.e., access point or group owner). Afterwards, when the working bandwidth corresponding to the WiFi connection is inconsistent with the target working bandwidth, the first electronic device can send a reconnection notification to the second electronic device to notify the second electronic device that the first electronic device will disconnect from the second electronic device and re-establish the WiFi connection. Afterwards, the first electronic device re-establishes a WiFi connection with the second electronic device, wherein the working bandwidth corresponding to the re-established WiFi connection is the target working bandwidth, and then the target working bandwidth can be used to transmit the target data between the first electronic device and the second electronic device, thereby improving the data transmission rate, shortening the data transmission time, and thus realizing the rapid transmission of large files, improving the user experience.
[0512] In addition, when the first electronic device and the second electronic device transmit target data, if the working bandwidth for transmitting data between the first electronic device and the second electronic device is inconsistent with the target working bandwidth (that is, the first electronic device and the second electronic device cannot use the negotiated larger working bandwidth to transmit data), the first electronic device can send a management frame notification to the second electronic device to adjust the working bandwidth corresponding to the WiFi connection established between the first electronic device and the second electronic device to the target working bandwidth indicated by the management frame notification, and then the target working bandwidth can be used to transmit target data between the first electronic device and the second electronic device, thereby improving the data transmission rate, shortening the data transmission time, and realizing the rapid transmission of large files, thereby improving the user experience.
[0513] Corresponding to the methods in the aforementioned embodiments, embodiments of the present application further provide a data transmission device. This data transmission device can be applied to a first electronic device to implement the methods in the aforementioned embodiments. The functions of the data transmission device can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions.
[0514] For example, FIG19 shows a schematic structural diagram of a data transmission device 1900 . As shown in FIG19 , the data transmission device 1900 may include: an acquisition module 1901 , a sending module 1902 , and an adjustment module 1903 .
[0515] Among them, the acquisition module 1901 can be used to obtain first information in response to a first operation; wherein the first operation is used to trigger the first electronic device to send the first data to be transmitted to the second electronic device, or to trigger the second electronic device to send the first data to the first electronic device.
[0516] The sending module 1902 can be used to send a first notification to the second electronic device in a first role when the first information meets a preset condition, so that the second electronic device adjusts the working bandwidth of the second electronic device as a second role to the first working bandwidth indicated by the first notification, and the second role is a role that is relative to the first role.
[0517] The adjustment module 1903 may be configured to adjust the working bandwidth corresponding to the first electronic device serving as the first role to the first working bandwidth.
[0518] The sending module 1902 can also be used to transmit first data with the second electronic device based on the first WiFi connection using the first working bandwidth, wherein the first WiFi connection is a WiFi connection established between the first electronic device as the first role and the second electronic device as the second role.
[0519] In another possible implementation, the first role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and the second role is one of a site or a group client; or, the first role is one of a site or a group client, and the second role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot.
[0520] In another possible implementation, the first notification includes an extended channel switching notification and an operating mode notification.
[0521] In another possible implementation, the first role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot; the second role is one of a site or a group client; and the first notification is an extended channel switching notification; the sending module 1902 can be specifically used to send an extended channel switching notification to the second electronic device in the first role.
[0522] In another possible implementation, the first information includes the chip type of the WiFi chip configured in the electronic device as the third role or the second working bandwidth for transmitting data between the first electronic device and the second electronic device, wherein the third role is a site or a group client.
[0523] In another possible implementation, the first information satisfies a preset condition, which may include: the chip type of the WiFi chip configured in the electronic device serving as the third role is a preset type; or the second working bandwidth is inconsistent with the first working bandwidth.
[0524] In another possible implementation, the first information satisfies the preset condition that the second operating bandwidth is inconsistent with the first operating bandwidth. The sending module 1902 may further be configured to transmit the first data to the second electronic device using the second operating bandwidth based on the first WiFi connection, where the second operating bandwidth is smaller than the first operating bandwidth. The sending module 1902 may specifically be configured to transmit the second data to the second electronic device using the first operating bandwidth based on the first WiFi connection.
[0525] For example, FIG20 shows a schematic structural diagram of a data transmission device 2000 . As shown in FIG20 , the data transmission device 2000 may include: a communication module 2001 and a sending module 2002 .
[0526] Among them, the communication module 2001 can be used to establish a first WiFi connection with the second electronic device as a fourth role as a third role when the first electronic device transmits the first data to the second electronic device, and the working bandwidth corresponding to the first WiFi connection is the second working bandwidth; wherein the first data is the data to be transmitted sent by the first electronic device to the second electronic device, or the first data is the data to be transmitted sent by the second electronic device to the first electronic device.
[0527] The sending module 2002 can be used to send a second notification to the second electronic device when the second working bandwidth is inconsistent with the first working bandwidth. The second notification is used to instruct the first electronic device to disconnect from the second electronic device and re-establish a WiFi connection; wherein the first working bandwidth is the working bandwidth negotiated between the first electronic device and the second electronic device, and the first working bandwidth is greater than the second working bandwidth.
[0528] The communication module 2001 can also be used to serve as a third role and establish a second WiFi connection with a second electronic device serving as a fourth role. The working bandwidth corresponding to the second WiFi connection is the first working bandwidth.
[0529] The sending module 2002 may also be configured to transmit the first data to the second electronic device using the first working bandwidth based on the second WiFi connection.
[0530] For example, FIG21 shows a schematic structural diagram of a data transmission device 2100 . As shown in FIG21 , the data transmission device 2100 may include: a receiving module 2101 , an adjustment module 2102 , a communication module 2103 and a sending module 2104 .
[0531] Among them, the receiving module 2101 can be used to receive the second information sent by the second electronic device, the second information includes the identification information and the first working bandwidth corresponding to the fifth role created by the second electronic device; wherein the fifth role is a role created by the second electronic device when receiving the first operation; the first operation is used to trigger the first electronic device to send the first data to be transmitted to the second electronic device, or to trigger the second electronic device to send the first data to the first electronic device.
[0532] Adjustment module 2102 can be used to adjust the working bandwidth of the first electronic device as the sixth role to the first working bandwidth when the first electronic device scans the first access point as the sixth role and the identification information corresponding to the first access point matches the identification information corresponding to the fifth role. The sixth role is a role that is relative to the fifth role.
[0533] The communication module 2103 can be used to serve as the sixth role and establish a WiFi connection with the second electronic device serving as the fifth role.
[0534] The sending module 2104 may be configured to transmit first data to the second electronic device using a first working bandwidth based on a WiFi connection.
[0535] For example, FIG22 shows a schematic structural diagram of a data transmission device 2200 . As shown in FIG22 , the data transmission device 2200 may include: an acquisition module 2201 , an adjustment module 2202 , a communication module 2203 and a sending module 2204 .
[0536] The acquisition module 2201 can be used to obtain the working frequency band corresponding to the seventh role created by the second electronic device when the first electronic device and the second electronic device transmit the first data; wherein the first data is the data to be transmitted sent by the first electronic device to the second electronic device, or the first data is the data to be transmitted sent by the second electronic device to the first electronic device.
[0537] The adjustment module 2202 may be configured to adjust the operating bandwidth of the first electronic device as the eighth role to the first operating bandwidth when the operating frequency band corresponding to the seventh role is a preset frequency band.
[0538] The communication module 2203 can be used to serve as the eighth role and establish a WiFi connection with the second electronic device serving as the seventh role.
[0539] The sending module 2204 may be configured to transmit first data to the second electronic device using a first working bandwidth based on a WiFi connection.
[0540] It should be understood that the division of units or modules (hereinafter referred to as units) in the above devices is merely a division of logical functions. In actual implementation, they may be fully or partially integrated into a single physical entity, or physically separated. Furthermore, the units in the device may be implemented entirely in the form of software called through processing elements; entirely in the form of hardware; or partially in the form of software called through processing elements, and partially in the form of hardware.
[0541] For example, each unit can be a separately established processing element, or it can be integrated into a certain chip of the device for implementation. In addition, it can also be stored in a memory in the form of a program, and called by a certain processing element of the device to execute the function of the unit. In addition, all or part of these units can be integrated together, or they can be implemented independently. The processing element described here can also be called a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above units can be implemented by the integrated logic circuit of the hardware in the processor element or in the form of software called by the processing element.
[0542] In one example, the units in the above apparatus may be one or more integrated circuits configured to implement the above method, such as one or more ASICs, or one or more DSPs, or one or more FPGAs, or a combination of at least two of these integrated circuit forms.
[0543] For another example, when the units in the device can be implemented in the form of a processing element scheduling program, the processing element can be a general-purpose processor, such as a CPU or other processor that can call programs. For another example, these units can be integrated together and implemented in the form of a system on a chip (SOC).
[0544] In one implementation, the units implementing the corresponding steps of the above methods in the apparatus described above may be implemented in the form of a processing element scheduling program. For example, the apparatus may include a processing element and a storage element, with the processing element invoking a program stored in the storage element to execute the method described in the above method embodiments. The storage element may be a storage element on the same chip as the processing element, i.e., an on-chip storage element.
[0545] In another implementation, the program for executing the above method may be stored in a memory element on a different chip from the processing element, i.e., an off-chip memory element. In this case, the processing element calls or loads the program from the off-chip memory element onto the on-chip memory element to call and execute the method described in the above method embodiment.
[0546] For example, embodiments of the present application may further provide a device, such as an electronic device, which may include a processor and a memory for storing instructions executable by the processor. When the processor is configured to execute the instructions, the electronic device implements the shortcut input method described in the aforementioned embodiments. The memory may be located within or outside the electronic device. The processor may include one or more.
[0547] In another implementation, the unit of the apparatus implementing each step of the above method may be configured as one or more processing elements, which may be provided on the corresponding electronic device. The processing elements may be integrated circuits, such as one or more ASICs, one or more DSPs, one or more FPGAs, or a combination of these integrated circuits. These integrated circuits may be integrated together to form a chip.
[0548] For example, embodiments of the present application further provide a chip that can be used in the aforementioned electronic device. The chip includes one or more interface circuits and one or more processors; the interface circuits and processors are interconnected via circuits; the processors receive and execute computer instructions from the electronic device's memory via the interface circuits to implement the methods described in the aforementioned method embodiments.
[0549] An embodiment of the present application also provides a computer program product, including computer instructions executed by the above-mentioned electronic device.
[0550] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0551] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0552] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0553] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0554] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, such as a program. The software product is stored in a program product, such as a computer-readable storage medium, and includes a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
[0555] For example, embodiments of the present application may further provide a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by an electronic device, the electronic device implements the shortcut input method described in the aforementioned method embodiment.
[0556] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A data transmission method, characterized in that: Applied to a first electronic device, the method includes: In response to a first operation, the first electronic device acquires first information; wherein the first operation is used to trigger the first electronic device to send first data to be transmitted to the second electronic device, or to trigger the second electronic device to send the first data to the first electronic device; When the first information satisfies a preset condition, the first electronic device sends a first notification to the second electronic device as a first role, so that the second electronic device adjusts the working bandwidth of the second electronic device as a second role to the first working bandwidth indicated by the first notification, and the second role is a role in a relative relationship with the first role; The first electronic device adjusts the working bandwidth corresponding to the first electronic device acting as the first role to the first working bandwidth; The first electronic device transmits the first data to the second electronic device using the first working bandwidth based on a first WiFi connection, wherein the first WiFi connection is a WiFi connection established between the first electronic device as the first role and the second electronic device as the second role.
2. The method according to claim 1, characterized in that: The first role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and the second role is one of a site or a group client; or The first role is a role in a site or a group client, and the second role is a role in an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot.
3. The method according to claim 1, characterized in that The first notification includes an extended channel switching notification and an operating mode notification.
4. The method according to claim 1, characterized in that The first role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot; the second role is one of a site or a group client; the first notification is an extended channel switching notification; and the first electronic device sends the first notification to the second electronic device as the first role, including: The first electronic device sends the extended channel switching notification to the second electronic device in the first role.
5. The method according to claim 1, characterized in that The first information includes a chip type of a WiFi chip configured in an electronic device as a third role or a second working bandwidth for transmitting data between the first electronic device and the second electronic device, wherein the third role is a site or a group client.
6. The method according to claim 5, characterized in that The first information satisfies a preset condition, including: The chip type of the WiFi chip configured in the electronic device as the third role is a preset type; or, The second operating bandwidth is inconsistent with the first operating bandwidth.
7. The method according to claim 6, characterized in that The first information satisfies a preset condition that the second working bandwidth is inconsistent with the first working bandwidth. Before the first electronic device acquires the first information in response to the first operation, the method further includes: The first electronic device transmits the first data to the second electronic device using the second working bandwidth based on the first WiFi connection, and the second working bandwidth is smaller than the first working bandwidth; The first electronic device transmits the first data to the second electronic device using the first working bandwidth based on the first WiFi connection, including: The first electronic device is connected to the first WiFi and transmits data to the second electronic device using the first working bandwidth. The second data is the remaining data in the first data except the data transmitted between the second electronic device and the second electronic device using the second working bandwidth.
8. A data transmission method, characterized in that: Applied to a first electronic device, the method includes: In the case where the first electronic device transmits the first data to the second electronic device, the first electronic device, as the third role, establishes a first WiFi connection with the second electronic device, as the fourth role, and the working bandwidth corresponding to the first WiFi connection is the second working bandwidth; wherein the first data is the data to be transmitted sent by the first electronic device to the second electronic device, or the first data is the data to be transmitted sent by the second electronic device to the first electronic device; When the second working bandwidth is inconsistent with the first working bandwidth, the first electronic device sends a second notification to the second electronic device, where the second notification is used to indicate that the first electronic device will disconnect from the second electronic device and re-establish a WiFi connection; wherein the first working bandwidth is a working bandwidth obtained through negotiation between the first electronic device and the second electronic device, and the first working bandwidth is greater than the second working bandwidth; The first electronic device, as a third role, establishes a second WiFi connection with the second electronic device, as a fourth role, and the working bandwidth corresponding to the second WiFi connection is the first working bandwidth; The first electronic device transmits the first data to the second electronic device using the first working bandwidth based on the second WiFi connection.
9. The method according to claim 8, characterized in that The first electronic device sending a second notification to the second electronic device includes: The first electronic device acquires a data volume corresponding to the first data; When the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device sends a second notification to the second electronic device.
10. The method according to claim 8, characterized in that The first electronic device, as the third role, establishes a second WiFi connection with the second electronic device, as the fourth role, including: The first electronic device sends a first request to the second electronic device; When the first electronic device receives the first response to the first request sent by the second electronic device, the first electronic device, as the third role, establishes a second WiFi connection with the second electronic device, as the fourth role.
11. The method according to claim 8, characterized in that The third role is a role in a site or a group client, and the fourth role is a role in an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot.
12. A data transmission method, characterized in that: Applied to a first electronic device, the method includes: The first electronic device receives second information sent by the second electronic device, where the second information includes identification information corresponding to a fifth role created by the second electronic device and a first working bandwidth; wherein the fifth role is a role created by the second electronic device when receiving a first operation; and the first operation is used to trigger the first electronic device to send first data to be transmitted to the second electronic device, or to trigger the second electronic device to send the first data to the first electronic device; When the first electronic device scans a first access point in a sixth role and the identification information corresponding to the first access point matches the identification information corresponding to the fifth role, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, and the sixth role is a role in a relative relationship with the fifth role; The first electronic device, as the sixth role, establishes a WiFi connection with the second electronic device, as the fifth role; The first electronic device transmits data to the second electronic device using the first working bandwidth based on the WiFi connection. The first data.
13. The method according to claim 12, characterized in that The first electronic device is configured with a first WiFi chip, and before the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth, the method further includes: The first electronic device obtains a chip type of the first WiFi chip; The first electronic device adjusting the working bandwidth of the first electronic device as the sixth role to the first working bandwidth includes: When the chip type of the first WiFi chip is a preset type, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth.
14. The method according to claim 13, characterized in that After the first electronic device obtains the chip type of the first WiFi chip, the method further includes: The first electronic device acquires a data volume corresponding to the first data; The first electronic device adjusting the working bandwidth of the first electronic device as the sixth role to the first working bandwidth includes: When the chip type of the first WiFi chip is a preset type and the data volume corresponding to the first data is greater than or equal to the first data volume, the first electronic device adjusts the working bandwidth of the first electronic device as the sixth role to the first working bandwidth.
15. The method according to claim 12, characterized in that The fifth role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and the sixth role is one of a site or a group client.
16. A data transmission method, characterized in that: Applied to a first electronic device, where the first electronic device is a terminal device, the method includes: In the case where the first electronic device transmits first data to the second electronic device, the first electronic device obtains the working frequency band corresponding to the seventh role created by the second electronic device; wherein the first data is data to be transmitted sent by the first electronic device to the second electronic device, or the first data is data to be transmitted sent by the second electronic device to the first electronic device; When the working frequency band corresponding to the seventh role is a preset frequency band, the first electronic device adjusts the working bandwidth of the first electronic device as the eighth role to the first working bandwidth; The first electronic device, as the eighth role, establishes a WiFi connection with the second electronic device, as the seventh role; The first electronic device transmits the first data to the second electronic device based on the WiFi connection using the first working bandwidth.
17. The method according to claim 16, characterized in that The first electronic device, as the eighth role, establishes a WiFi connection with the second electronic device, as the seventh role, including: The first electronic device, as the eighth role, sends a second request to the second electronic device, where the second request includes the first working bandwidth; The first electronic device receives a second response corresponding to the second request sent by the second electronic device; The first electronic device transmits the first data to the second electronic device using the first working bandwidth based on the WiFi connection, including: When the second response indicates that the second electronic device supports the first working bandwidth, the first electronic device transmits the first data to the second electronic device using the first working bandwidth based on the WiFi connection.
18. The method according to claim 17, characterized in that After the first electronic device receives a second response corresponding to the second request sent by the second electronic device, the method further includes: When the second response indicates that the second electronic device does not support the first working bandwidth, the first electronic device adjusts the working bandwidth of the first electronic device as the eighth role to a third working bandwidth indicated by the second response, where the third working bandwidth is less than the first working bandwidth; The first electronic device transmits the first data to the second electronic device based on the WiFi connection using the third working bandwidth.
19. The method according to claim 18, characterized in that The third working bandwidth is greater than a fourth working bandwidth, wherein the fourth working bandwidth is a working bandwidth set for the seventh role when the second electronic device creates the seventh role.
20. The method according to claim 16, characterized in that The first electronic device acquires a working frequency band corresponding to a seventh role created by the second electronic device, including: The first electronic device acquires a data volume corresponding to the first data; When the data amount corresponding to the first data is greater than or equal to the first data amount, the first electronic device obtains the working frequency band corresponding to the seventh role created by the second electronic device.
21. The method according to claim 16, characterized in that The seventh role is one of an access point, a group owner, a personal mobile hotspot, a virtual access point, and a hotspot, and the eighth role is one of a site or a group client.
22. An electronic device, characterized in that: The electronic device includes a processor and a memory for storing instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the method as described in any one of claims 1 to 7; or, when the processor is configured to execute the instructions, the electronic device implements the method as described in any one of claims 8 to 11; or, when the processor is configured to execute the instructions, the electronic device implements the method as described in any one of claims 12 to 15; or, when the processor is configured to execute the instructions, the electronic device implements the method as described in any one of claims 16 to 21.
23. A chip system, characterized in that: The chip system is coupled to a memory, and the chip system is used to read and execute a computer program stored in the memory to implement the method as described in any one of claims 1 to 7, or to implement the method as described in any one of claims 8 to 11, or to implement the method as described in any one of claims 12 to 15, or to implement the method as described in any one of claims 16 to 21.
24. A computer-readable storage medium having computer program instructions stored thereon; characterized in that: When the computer program instructions are executed by an electronic device, the electronic device implements the method as described in any one of claims 1 to 7; or, when the computer program instructions are executed by an electronic device, the electronic device implements the method as described in any one of claims 8 to 11; or, when the computer program instructions are executed by an electronic device, the electronic device implements the method as described in any one of claims 12 to 15; or, when the computer program instructions are executed by an electronic device, the electronic device implements the method as described in any one of claims 16 to 21.
Citation Information
Patent Citations
Channel bandwidth control method and device, storage medium and station
CN110944359A
Data transmission method and electronic equipment
CN111416794A
Channel indication method in wireless local area network and related device
CN113645017A
WIFI and Bluetooth coexisting data transmission method and device, and storage medium
CN114286448A