Data sending method and electronic equipment
The data transmission method in electronic devices facilitates seamless switching between dual Wi-Fi links, addressing poor communication experiences by enabling smooth transmission through the second link when the first deteriorates, without requiring application adaptation, thus enhancing stability and quality.
Patent Information
- Application Number
- CN202310786651.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2024-12-31
AI Technical Summary
Existing electronic devices with dual-channel Wi-Fi networks experience poor communication experiences due to signal interference or failure, leading to long interruption times and the need for application-level intervention when one Wi-Fi link deteriorates, as the second link cannot automatically process data from the first.
A data transmission method that enables seamless switching between dual Wi-Fi links by establishing a connection between the first and second Wi-Fi interfaces when an abnormality is detected, allowing data to be transmitted through the second link using the IP address of the first, without requiring application adaptation.
Ensures smooth and stable dual Wi-Fi link usage without special application intervention, improving transmission quality by allowing users to utilize dual Wi-Fi features quickly and stably, even when one link fails or is overloaded.
Smart Images

Figure CN119233293A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of intelligent terminals, and in particular to a data sending method and an electronic device. Background Art
[0002] In the existing related technologies, electronic devices (such as smart phones) can generally implement dual-channel wireless fidelity (Wi-Fi) network master-slave or dual-channel concurrent to improve the communication experience of electronic devices. However, if the electronic device moves or the signal is interfered, the signal of the first Wi-Fi link deteriorates or drops, and the data packets carried on the first Wi-Fi link cannot be connected, and the second Wi-Fi link cannot automatically process the original data packets on the first Wi-Fi link. The application needs to perceive the abnormality of the first Wi-Fi link and initiate reconstruction on the second Wi-Fi link, and the interruption time is relatively long. In other words, improving the communication experience of electronic devices through dual-channel Wi-Fi requires the participation of applications, and it cannot be smooth. Summary of the invention
[0003] The embodiments of the present application provide a data transmission method and an electronic device. The embodiments of the present application also provide a computer-readable storage medium, so as to realize that, under the premise that the application is not aware of the working mode of the dual-path Wi-Fi, when the state of the first Wi-Fi link is abnormal, the data of the first Wi-Fi link is transmitted using the second Wi-Fi link, so as to realize smooth switching and improve the transmission quality.
[0004] In a first aspect, an embodiment of the present application provides a data sending method, which is applied to an electronic device, wherein the electronic device includes a first wireless fidelity Wi-Fi module and a second Wi-Fi module, and the method includes: sending application data from a first Wi-Fi link through a first Wi-Fi interface, wherein the first Wi-Fi link is established by the electronic device through the first Wi-Fi module on a first Wi-Fi physical channel; in response to detecting that the state of the first Wi-Fi link is abnormal, establishing a connection between the first Wi-Fi interface and the second Wi-Fi physical channel; sending the application data from the second Wi-Fi link through the first Wi-Fi interface; wherein the second Wi-Fi link is established by the electronic device through the second Wi-Fi module on the second Wi-Fi physical channel, and the IP address carried in the data sent through the first Wi-Fi interface is the IP address corresponding to the first Wi-Fi interface.
[0005] In the above data sending method, the electronic device sends the application data from the first Wi-Fi link through the first Wi-Fi interface. In response to detecting that the state of the first Wi-Fi link is abnormal, the electronic device establishes a connection between the first Wi-Fi interface and the second Wi-Fi physical channel, and the electronic device sends the above application data from the second Wi-Fi link through the first Wi-Fi interface. Among them, the IP address carried in the data sent through the first Wi-Fi interface is the IP address corresponding to the first Wi-Fi interface, so that when a Wi-Fi link state is abnormal (for example: a failure or excessive load), dual Wi-Fi link smooth routing can be achieved, allowing users (applications) to use the dual Wi-Fi link features unconsciously, quickly and stably, and no special application adaptation is required, thereby improving the problem of poor service experience caused by an abnormal state of a Wi-Fi link.
[0006] In one possible implementation manner, the method further includes: in response to detecting that the state of the first Wi-Fi link is abnormal, determining that the first Wi-Fi module and the second Wi-Fi module are switched to a sharing mode.
[0007] In one possible implementation manner, after establishing a connection between the first Wi-Fi interface and the second Wi-Fi physical channel, the method further includes: sending data of the application from the second Wi-Fi link through the second Wi-Fi interface; wherein the IP address carried in the data sent through the second Wi-Fi interface is the IP address corresponding to the second Wi-Fi interface.
[0008] In the above implementation, when the state of the first Wi-Fi link is abnormal, it is determined that the first Wi-Fi module and the second Wi-Fi module are switched to the sharing mode, and the first Wi-Fi interface is connected to the second Wi-Fi physical channel, so that the data of the above application can be sent from the second Wi-Fi link through the first Wi-Fi interface; and because the state of the second Wi-Fi link is normal, the electronic device can continue to send the application data from the second Wi-Fi link through the second Wi-Fi interface. In this way, the IP address carried in the data sent on the second Wi-Fi link includes both the IP address corresponding to the first Wi-Fi interface and the IP address corresponding to the second Wi-Fi interface. For the application, the application uses the first Wi-Fi interface or the second Wi-Fi interface to send data as usual, without the need to perceive the working mode of the dual Wi-Fi link. When the state of one of the Wi-Fi links is abnormal, the other Wi-Fi link can be used to ensure smooth switching and better transmission quality.
[0009] In one possible implementation, after sending the application data from the second Wi-Fi link through the first Wi-Fi interface, the method further includes: in response to detecting that the state of the first Wi-Fi link returns to normal, establishing a connection between the first Wi-Fi interface and the first Wi-Fi physical channel; and sending the application data from the first Wi-Fi link through the first Wi-Fi interface.
[0010] In one possible implementation manner, the method further includes: in response to detecting that the state of the first Wi-Fi link returns to normal, determining that the first Wi-Fi module and the second Wi-Fi module are switched from a shared mode to an exclusive mode.
[0011] In one possible implementation manner, after establishing a connection between the first Wi-Fi interface and the first Wi-Fi physical channel, the method further includes: sending data of the application from the second Wi-Fi link through the second Wi-Fi interface; wherein the IP address carried in the data sent through the second Wi-Fi interface is the IP address corresponding to the second Wi-Fi interface.
[0012] In the above implementation, after the state of the first Wi-Fi link returns to normal, the electronic device establishes a connection between the first Wi-Fi interface and the first Wi-Fi physical channel, continues to send the data of the above application from the first Wi-Fi link through the first Wi-Fi interface, and sends the data of the above application from the second Wi-Fi link through the second Wi-Fi interface. At this time, the IP address of the data sent on the first Wi-Fi link is the IP address corresponding to the first Wi-Fi interface, and the IP address of the data sent on the second Wi-Fi link is the IP address corresponding to the second Wi-Fi interface. In addition, the first Wi-Fi module and the second Wi-Fi module can also be switched from shared mode to exclusive mode. Similarly, as described above, these operations are not perceived by the applications in the electronic device, and the applications use the first Wi-Fi interface or the second Wi-Fi interface to send data as usual.
[0013] In one possible implementation, the abnormal state of the first Wi-Fi link includes a failure of the first Wi-Fi link; and the method further includes: in response to detecting that the first Wi-Fi link fails, shielding a fault report of the first Wi-Fi link.
[0014] In one possible implementation manner, the abnormal state of the first Wi-Fi link includes that a load of the first Wi-Fi link is greater than or equal to a predetermined load threshold.
[0015] In the above implementation, when the first Wi-Fi link fails or the load of the first Wi-Fi link is greater than or equal to a predetermined load threshold, the electronic device may establish a connection between the first Wi-Fi interface and the second Wi-Fi physical channel, and send the data of the above application from the second Wi-Fi link through the first Wi-Fi interface, so that when a Wi-Fi link is in an abnormal state (for example, a failure occurs or the load is too high), smooth routing of dual Wi-Fi links can be achieved, allowing users (applications) to use the dual Wi-Fi link features seamlessly, quickly, and stably without the need for special application adaptation, thereby improving the problem of poor service experience caused by an abnormal state of a Wi-Fi link.
[0016] In one possible implementation manner, before sending the application data from the first Wi-Fi link through the first Wi-Fi interface, the method further includes: establishing the first Wi-Fi link on the first Wi-Fi physical channel through the first Wi-Fi module; and establishing the second Wi-Fi link on the second Wi-Fi physical channel through the second Wi-Fi module; establishing a connection between the first Wi-Fi interface and the first Wi-Fi physical channel, and establishing a connection between the second Wi-Fi interface and the second Wi-Fi physical channel.
[0017] In one possible implementation, before establishing a connection between the first Wi-Fi interface and the first Wi-Fi physical channel and establishing a connection between the second Wi-Fi interface and the second Wi-Fi physical channel, the method further includes: determining that the first Wi-Fi module and the second Wi-Fi module are operating in exclusive mode.
[0018] In the above implementation, at the initial stage of establishing the first Wi-Fi link and the second Wi-Fi link in the electronic device, it is determined that the first Wi-Fi module and the second Wi-Fi module operate in exclusive mode, that is, the first Wi-Fi interface is connected to the first Wi-Fi physical channel, and the second Wi-Fi interface is connected to the second Wi-Fi physical channel. In this way, data between the two Wi-Fi interfaces do not affect each other, and data between the two Wi-Fi physical channels do not affect each other.
[0019] In a second aspect, an embodiment of the present application provides an electronic device having the function of implementing the electronic device behavior in the first aspect and the possible implementation of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a sending module and an establishing module, etc.
[0020] In a third aspect, an embodiment of the present application provides a data sending device, which is included in an electronic device, and has the function of implementing the electronic device behavior in the first aspect and the possible implementation of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a sending module and an establishment module, etc.
[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the method provided in the first aspect.
[0022] It should be understood that the second, third and fourth aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.
[0023] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method provided in the first aspect.
[0024] In a sixth aspect, an embodiment of the present application provides a computer program, which, when executed by a computer, is used to execute the method provided in the first aspect.
[0025] In one possible design, the program in the sixth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of dual-path Wi-Fi provided for the existing related technology;
[0027] Figure 2 A schematic diagram of a dual-path Wi-Fi solution provided by the existing related technology;
[0028] Figure 3 A schematic diagram of another dual-path Wi-Fi solution provided by the existing related technology;
[0029] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application;
[0030] Figure 5A structural block diagram of a Wi-Fi software system of an electronic device 100 provided in one embodiment of the present application;
[0031] Figure 6 A schematic diagram of a dual Wi-Fi link working in exclusive mode at the initial stage of establishing a dual Wi-Fi link according to an embodiment of the present application;
[0032] Figure 7 A schematic diagram of a dual Wi-Fi link working in a sharing mode provided by another embodiment of the present application;
[0033] Figure 8 A flowchart of initially establishing a dual Wi-Fi link provided by one embodiment of the present application;
[0034] Fig. 9 A flowchart of data transmission after dual Wi-Fi links are established according to an embodiment of the present application;
[0035] Fig.10 A flowchart of data transmission after dual Wi-Fi links are established according to another embodiment of the present application;
[0036] Fig.11 A flowchart of a data sending method provided by an embodiment of the present application;
[0037] Fig.12 A flowchart of a data sending method provided by another embodiment of the present application;
[0038] Fig.13 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application;
[0039] Fig.14 A schematic diagram of the structure of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0040] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0041] Figure 1 A schematic diagram of dual-path Wi-Fi provided by existing related technologies, such as Figure 1 As shown in the figure, there are two Wi-Fi physical channels between the mobile phone and the router, namely the 2.4G physical channel and the 5G physical channel. A Wi-Fi link can be established on the 2.4G physical channel and the 5G physical channel respectively. Normal data Internet access services can flexibly use the above two Wi-Fi links. Figure 1When the mobile phone 101 moves (for example, the mobile phone 101 is roaming), one of the Wi-Fi links (such as the 5G Wi-Fi link) may be disconnected, which may cause the service originally provided by the 5G Wi-Fi link to be unable to be carried out.
[0042] To solve this problem, the existing related technology provides two technical solutions. Figure 2 A schematic diagram of a dual-path Wi-Fi solution provided by the existing related technology, such as Figure 2 As shown, there are two Wi-Fi physical channels between the electronic device 201 and the router, namely, a 2.4G physical channel and a 5G physical channel. For each flow of the application in the electronic device 201, two sub-flows are created, namely, sub-flow 1 and sub-flow 2. The source Internet Protocol (IP) address of sub-flow 1 is 192.168.1.101, and the source IP address of sub-flow 2 is 192.168.1.100. In addition, the Wi-Fi interface corresponding to sub-flow 1 is WLAN0, and the Wi-Fi interface corresponding to sub-flow 2 is WLAN1.
[0043] Figure 2 The figure also shows a protocol stack 202 and a protocol stack 203. The protocol stack 202 is a standard transmission control protocol (TCP) protocol stack. The protocol stack 202 includes three layers: the bottom layer is the IP layer, the middle layer is the TCP layer, and the top layer is the application layer.
[0044] The protocol stack 203 is a multi-path transmission control protocol (MPTCP) protocol stack. The protocol stack 203 is used to implement Figure 2 The solution of the dual-path Wi-Fi shown in the figure proposes that the protocol stack 203 includes 4 layers, the bottom layer is the IP layer, the TCP layer is above the IP layer, the MPTCP layer is above the TCP layer, and the top layer is the application layer. Figure 2 In the solution shown, two sub-streams are created for each stream of the application, so the IP layer includes the source IP addresses of the two sub-streams, the TCP layer carries the above two sub-streams, and a multi-sub-stream allocation selection protocol is implemented in the MPTCP layer. The MPTCP layer implements the selective sending, redundant sending, deduplication and / or sequence reordering of sub-streams. These operations are invisible to the application layer, so that the application in the electronic device 201 can use dual Wi-Fi links without complex adaptation.
[0045] However, this solution mainly achieves the purpose of using dual Wi-Fi links by modifying the TCP protocol and deploying the MPTCP protocol on both the end side and the cloud side. It is difficult to implement and has been deployed relatively little since its proposal. In addition, this solution only supports the TCP protocol and cannot support other Internet protocol (IP) family protocols.
[0046] Figure 3 A schematic diagram of another dual-path Wi-Fi solution provided by the prior art is provided, in which the driver layer provides a wireless fidelity point-to-point (Wi-Fi Peer to Peer, Wi-Fi P2P) dual-link message redundant dual-send solution, such as Figure 3 As shown, there are two Wi-Fi physical channels between the electronic device 301 and the router. A Wi-Fi link is established between the electronic device 301 and the router on the 2.4G physical channel. The Wi-Fi interface corresponding to the Wi-Fi link is WLAN0, and the IP address corresponding to WLAN0 is 192.168.1.100. A Wi-Fi P2P link is established between the electronic device 301 and the router on the 5G physical channel.
[0047] For the application in the electronic device 301, only one Wi-Fi link can be seen. At the driver layer, redundant transmission and deduplication of the 5G P2P link and the 2.4G Wi-Fi link are used to allow the application to obtain the low latency advantage of using dual-path Wi-Fi. This solution mainly obtains the low latency experience of dual-path Wi-Fi through redundant dual transmission of the 2.4G Wi-Fi link and the 5G P2P link. However, this solution can only provide one Wi-Fi interface, and it is difficult to achieve the ability of flexible link switching or aggregation of the underlying dual links. If the 2.4G Wi-Fi link is disconnected, the ability of flexible link switching or aggregation of the underlying dual links cannot be guaranteed. At this time, the 5G P2P link cannot continue to carry the original business carried by the 2.4G Wi-Fi link.
[0048] Based on the above problems, the embodiments of the present application provide a data sending method, which is used to solve the problem that after the dual Wi-Fi links are established, when one of the Wi-Fi links is in an abnormal state (for example, a failure occurs or the load is too high), smooth routing of the dual Wi-Fi links is achieved through system layer encapsulation capabilities, so that users (or applications) can use the dual Wi-Fi link features seamlessly, quickly, and stably without the need for special application adaptation, thereby improving the problem of poor service experience caused by the abnormal state of one Wi-Fi link.
[0049] The data sending method provided in the embodiment of the present application can be applied to electronic devices, wherein the above-mentioned electronic devices can be smart phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, smart glasses, laptop computers, ultra-mobile personal computers (UMPC), netbooks or personal digital assistants (PDA) and other devices; the embodiment of the present application does not impose any restrictions on the specific type of electronic devices.
[0050] For example, Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present application is shown as follows: Figure 4 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0051] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0052] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0053] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0054] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0055] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0056] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include the global system for mobile communications (GSM), the general packet radio service (general DD231109I
[0057] The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0058] The Wi-Fi software system of the electronic device 100 adopts a layered architecture, which divides the software into several layers, each layer has a clear role and division of labor, and the layers communicate with each other through software interfaces. Figure 5 This is a structural block diagram of a Wi-Fi software system of an electronic device 100 provided in one embodiment of the present application.
[0059] like Figure 5 As shown, the Wi-Fi software system of the electronic device 100 is usually composed of an application layer (Application), a software framework layer (Framework), a kernel layer (Kernel-Native) and a hardware layer (Hardware), wherein the application layer includes Wi-Fi and P2P application business logic, and its main function is to present the user interface (UI) and / or business logic organization for business capabilities, such as when to start WLAN and / or when to send data. The software framework layer provides WLAN function interfaces, mainly including state change notification interfaces such as connection (connect) and disconnection (disconnect). The kernel layer is responsible for controlling the underlying hardware to establish Wi-Fi and / or P2P connections with other devices.
[0060] The data transmission method provided in the embodiment of the present application involves modification of the kernel layer. Specifically, the data transmission method is to optimize the WLAN process at the kernel layer (WLAN module). In the early stage of establishing the dual Wi-Fi link, the WLAN module of the kernel layer records the correspondence between the initial Wi-Fi interface and the bearer type (i.e., the Wi-Fi link), and puts the bearer type in an exclusive working mode. Figure 6 A schematic diagram of a dual Wi-Fi link established in an exclusive mode in the initial stage provided by an embodiment of the present application. Of course, the data transmission method provided by the embodiment of the present application is not limited to the modification of the kernel layer, and can also be modified at the software framework layer or the hardware layer.
[0061] When any bearer (i.e. any Wi-Fi link) fails, for example, when the link quality deteriorates or is disconnected, the WLAN module of the kernel layer can switch the working mode of the dual Wi-Fi links to the shared mode, and activate the other bearer route for use as the interface of this device. In addition, when any bearer is overloaded, the WLAN module of the kernel layer can also switch the working mode of the dual Wi-Fi links to the shared mode, and forward part of the data through the other bearer route. Figure 7 A schematic diagram of a dual Wi-Fi link operating in a shared mode is provided for another embodiment of the present application.
[0062] It should be noted that the current Wi-Fi physical channel may include a 2.4G physical channel, a 5G high-frequency physical channel, and a 5G low-frequency physical channel. For the convenience of description, in the embodiment of the present application, the Wi-Fi link corresponding to WLAN0 is established on the 2.4G physical channel, and the Wi-Fi link corresponding to WLAN1 is established on the 5G high-frequency physical channel as an example for explanation, and the Wi-Fi link established on the 2.4G physical channel is the first Wi-Fi link, and the Wi-Fi link established on the 5G high-frequency physical channel is the second Wi-Fi link. Unless otherwise specified, the 5G physical channels mentioned in the embodiment of the present application are all 5G high-frequency physical channels. Of course, in the specific implementation, any two physical channels can be selected from the 2.4G physical channel, the 5G high-frequency physical channel, and the 5G low-frequency physical channel, and the first Wi-Fi link and the second Wi-Fi link are established on the two selected physical channels, respectively. The method flow is exactly the same, and it will not be repeated in the embodiment of the present application.
[0063] Figure 8 A flowchart of initially establishing a dual Wi-Fi link is provided for one embodiment of the present application, such as Figure 8 As shown, it may include:
[0064] Step 801: The application sends a first Wi-Fi link establishment request (connect) to the software framework layer as needed.
[0065] Step 802: After receiving the first Wi-Fi link establishment request, the software framework layer sends the first Wi-Fi link establishment request to the first Wi-Fi module of the kernel layer. Figure 6 and Figure 7 The first Wi-Fi module can be a Wi-Fi module corresponding to the 2.4G Wi-Fi network.
[0066] Step 803: The first Wi-Fi module of the kernel layer sends a first Wi-Fi link establishment request to the hardware layer.
[0067] Step 804: After the hardware layer successfully establishes the first Wi-Fi link, it feeds back the successful establishment of the first Wi-Fi link to the first Wi-Fi module of the kernel layer, and the first Wi-Fi module feeds back the successful establishment of the first Wi-Fi link to the software framework layer.
[0068] Step 805: The software framework layer feeds back the first Wi-Fi interface corresponding to the first Wi-Fi link and the IP address corresponding to the first Wi-Fi interface to the application. In the embodiment of the present application, the first Wi-Fi interface is WLAN0 interface as an example for description.
[0069] Step 806: The application establishes an IP socket based on the first Wi-Fi interface as needed to perform network communication.
[0070] Step 807: The application sends a second Wi-Fi link establishment request (connect) to the software framework layer as needed.
[0071] Step 808: After receiving the second Wi-Fi link establishment request, the software framework layer sends the second Wi-Fi link establishment request to the second Wi-Fi module of the kernel layer. Figure 6 and Figure 7 , the second Wi-Fi module can be a Wi-Fi module corresponding to the 5G Wi-Fi network.
[0072] Step 809: The second Wi-Fi module of the kernel layer sends a second Wi-Fi link establishment request to the hardware layer.
[0073] Step 810: After the hardware layer successfully establishes the second Wi-Fi link, the hardware layer feeds back to the second Wi-Fi module of the kernel layer that the second Wi-Fi link is successfully established.
[0074] Step 811, the second Wi-Fi module negotiates with the first Wi-Fi module to work in exclusive mode, establishes a connection between the first Wi-Fi interface and the 2.4G physical channel, and establishes a connection between the second Wi-Fi interface and the 5G physical channel. The second Wi-Fi module feeds back to the software framework layer that the second Wi-Fi link is successfully established. In the embodiment of the present application, the second Wi-Fi interface is WLAN1 interface as an example for explanation.
[0075] Step 812: The software framework layer feeds back the second Wi-Fi interface (WLAN1 interface) corresponding to the second Wi-Fi link and the IP address corresponding to the second Wi-Fi interface to the application.
[0076] Step 813: The application establishes an IP socket based on the second Wi-Fi interface as needed to perform network communication.
[0077] In this embodiment, the electronic device establishes a first Wi-Fi link on the 2.4G physical channel, establishes a second Wi-Fi link on the 5G physical channel, and connects the first Wi-Fi interface to the 2.4G physical channel, and connects the second Wi-Fi interface to the 5G physical channel, so that the first Wi-Fi module and the second Wi-Fi module operate in exclusive mode, and the data sent by the application through the first Wi-Fi interface is sent from the first Wi-Fi link, and the data sent through the second Wi-Fi interface is sent from the second Wi-Fi link, and the two do not affect each other.
[0078] Fig. 9 A data transmission flow chart after the dual Wi-Fi link is established is provided in one embodiment of the present application, such as Fig. 9 As shown, it may include:
[0079] Step 901, the application establishes an IP socket based on the first Wi-Fi interface for network communication as needed, sends data to the first Wi-Fi module of the kernel layer, and the first Wi-Fi module sends the data to the hardware layer; and / or, the application establishes an IP socket based on the second Wi-Fi interface for network communication as needed, sends data to the second Wi-Fi module of the kernel layer, and the second Wi-Fi module sends the data to the hardware layer.
[0080] Step 902: A first Wi-Fi module of the kernel layer detects that a first Wi-Fi link fails.
[0081] In step 903, the first Wi-Fi module negotiates with the second Wi-Fi module of the kernel layer to work in a shared mode, establishes a connection between the first Wi-Fi interface and the 5G physical channel originally belonging to the second Wi-Fi interface, and shields the reporting of faults to the framework layer, so that the application will not perceive that the first Wi-Fi link has failed.
[0082] In step 904, the application will still send data through the originally bound first Wi-Fi interface, but after the data reaches the kernel driver, it is forwarded to the 5G physical channel because it works in shared mode. After receiving the data, the second Wi-Fi module forwards the data to the hardware layer.
[0083] Step 905: The first Wi-Fi module of the kernel layer detects that the first Wi-Fi link has recovered from the fault, and negotiates with the second Wi-Fi interface to restore the working mode to the exclusive mode, that is, the first Wi-Fi interface and the second Wi-Fi interface use their original physical channels respectively. At this time, the application will not perceive the failure recovery of the first Wi-Fi link either.
[0084] In step 906, the application will still send data through the originally bound first Wi-Fi interface. After the first Wi-Fi module receives the data, it works in exclusive mode, so the data is forwarded through the 2.4G physical channel.
[0085] In this embodiment, when the first Wi-Fi link fails, the first Wi-Fi module negotiates with the second Wi-Fi module to work in a shared mode, establishes a connection between the first Wi-Fi interface and the 5G physical channel, and shields reporting the fault to the framework layer. Therefore, the application will not perceive the failure of the first Wi-Fi link. Afterwards, the data sent by the application through the first Wi-Fi interface is sent from the second Wi-Fi link, realizing smooth routing of dual Wi-Fi links, allowing users (applications) to use the dual Wi-Fi link features unconsciously, quickly and stably, and no special application adaptation is required, thereby improving the problem of poor service experience caused by the failure of one Wi-Fi link.
[0086] Fig.10 A data transmission flow chart after the dual Wi-Fi link is established is provided in another embodiment of the present application, such as Fig.10 As shown, it may include:
[0087] Step 1001, the application establishes an IP socket based on the first Wi-Fi interface for network communication as needed, sends data to the first Wi-Fi module of the kernel layer, and the first Wi-Fi module sends the data to the hardware layer; and / or, the application establishes an IP socket based on the second Wi-Fi interface for network communication as needed, sends data to the second Wi-Fi module of the kernel layer, and the second Wi-Fi module sends the data to the hardware layer.
[0088] Step 1002: The first Wi-Fi module of the kernel layer detects the load of the first Wi-Fi link, and the second Wi-Fi module detects the load of the second Wi-Fi link, wherein the load may include indicators such as air share and / or forwarding delay.
[0089] Step 1003 , the first Wi-Fi module finds that the first Wi-Fi link is overloaded, negotiates with the second Wi-Fi module to work in a sharing mode, and requests the second Wi-Fi module to assist in forwarding data of the first Wi-Fi link.
[0090] In step 1004, the application will still send data through the originally bound first Wi-Fi interface, but after the data is sent to the first Wi-Fi module, because it works in shared mode and requires the assistance of the second Wi-Fi link, the first Wi-Fi module forwards part of the data in proportion through the 5G physical channel. After receiving the data, the second Wi-Fi module forwards the data to the hardware layer.
[0091] Step 1005: After the first Wi-Fi module of the kernel layer detects that the load of the first Wi-Fi link has returned to normal, it negotiates with the second Wi-Fi module to restore the working mode to the exclusive mode, that is, the first Wi-Fi interface and the second Wi-Fi interface use their original physical channels respectively. At this time, the application will not perceive that the load of the first Wi-Fi link has returned to normal.
[0092] In step 1006, the application will still send data through the originally bound first Wi-Fi interface. After the first Wi-Fi module receives the data, it works in exclusive mode, so the data is forwarded through the 2.4G physical channel.
[0093] In this embodiment, when the first Wi-Fi link is overloaded, the first Wi-Fi module negotiates with the second Wi-Fi module to work in a shared mode, and establishes a connection between the first Wi-Fi interface and the 5G physical channel. After that, part of the data sent by the application through the first Wi-Fi interface is sent from the first Wi-Fi link, and part is sent from the second Wi-Fi link, thereby achieving smooth routing of dual Wi-Fi links, allowing users (applications) to use the dual Wi-Fi link features seamlessly, quickly, and stably without the need for special application adaptation, thereby improving the problem of poor service experience caused by excessive load on one Wi-Fi link.
[0094] As described above, the embodiment of the present application provides a data sending method, and the user (application) may not be aware of the working mode of the dual Wi-Fi links. When the status of one Wi-Fi link is abnormal, the other Wi-Fi link can be used to ensure smooth switching and better transmission quality.
[0095] When the dual Wi-Fi links are established, the first Wi-Fi module and the second Wi-Fi module protocols of the kernel layer work in exclusive mode (to be compatible with the current mode); after the dual Wi-Fi links are established, the first Wi-Fi module and the second Wi-Fi module of the kernel layer can provide dual-path scheduling management (working in exclusive mode or shared mode), which can achieve application-independent and IP-protocol-independent WLAN service optimization.
[0096] Fig.11 A flowchart of a data transmission method provided for an embodiment of the present application, the above-mentioned data transmission method can be applied to an electronic device 100, and the electronic device 100 may include a first Wi-Fi module and a second Wi-Fi module. When implemented specifically, the first Wi-Fi module and the second Wi-Fi module may be included in the wireless communication module 160. As described above, the current Wi-Fi physical channel may include a 2.4G physical channel, a 5G high-frequency physical channel, and a 5G low-frequency physical channel. Therefore, the first Wi-Fi module and the second Wi-Fi module can be Wi-Fi modules corresponding to any two Wi-Fi networks among the 2.4G Wi-Fi network, the 5G low-frequency Wi-Fi network, and the 5G high-frequency Wi-Fi network, respectively.
[0097] In the present application, for the convenience of description, see Figure 6 and Figure 7 , the first Wi-Fi module may be a Wi-Fi module corresponding to a 2.4G Wi-Fi network; the second Wi-Fi module may be a Wi-Fi module corresponding to a 5G Wi-Fi network. Unless otherwise specified, the 5G Wi-Fi networks mentioned in the embodiments of the present application are all 5G high-frequency Wi-Fi networks.
[0098] like Fig.11 As shown, the above data sending method may include:
[0099] Step 1101 : the electronic device 100 sends application data from a first Wi-Fi link via a first Wi-Fi interface.
[0100] The first Wi-Fi link is established by the electronic device 100 on the first Wi-Fi physical channel through the first Wi-Fi module.
[0101] In this embodiment, the first Wi-Fi physical channel is a 2.4G physical channel, and the second Wi-Fi physical channel is a 5G high-frequency physical channel. As an example, this does not limit the embodiment of the present application. The first Wi-Fi physical channel and the second Wi-Fi physical channel can be any two physical channels of the 2.4G physical channel, the 5G high-frequency physical channel, and the 5G low-frequency physical channel, respectively.
[0102] In one implementation of this embodiment, the abnormal state of the first Wi-Fi link may be a failure of the first Wi-Fi link; thus, in response to detecting that the first Wi-Fi link has failed, the electronic device 100 may further shield the failure reporting of the first Wi-Fi link, so that the application in the electronic device 100 is unaware of the failure of the first Wi-Fi link.
[0103] In another implementation of this embodiment, the state of the first Wi-Fi link may be abnormal when the load of the first Wi-Fi link is greater than or equal to a predetermined load threshold, wherein the predetermined load threshold may be set according to system performance and / or implementation requirements during specific implementation, and the value of the predetermined load threshold is not limited in this embodiment. During specific implementation, the load of the first Wi-Fi link may be determined by indicators such as air share and / or forwarding delay.
[0104] Step 1102: In response to detecting that the state of the first Wi-Fi link is abnormal, the electronic device 100 establishes a connection between the first Wi-Fi interface and the second Wi-Fi physical channel.
[0105] In addition, in this embodiment, in response to detecting that the state of the first Wi-Fi link is abnormal, the electronic device 100 may determine that the first Wi-Fi module and the second Wi-Fi module are switched to a sharing mode.
[0106] Step 1103: The electronic device 100 sends the data of the above application from the second Wi-Fi link through the first Wi-Fi interface. The second Wi-Fi link is established by the electronic device 100 on the second Wi-Fi physical channel through the second Wi-Fi module, and the IP address carried in the data sent through the first Wi-Fi interface is the IP address corresponding to the first Wi-Fi interface.
[0107] That is to say, in this embodiment, when the status of the first Wi-Fi link is abnormal, the data sent by the application through the first Wi-Fi interface can be sent using the second Wi-Fi link. At this time, although the application data is sent by the second Wi-Fi link, the IP address carried in the above data is still the IP address corresponding to the first Wi-Fi interface.
[0108] Furthermore, after step 1102, the following steps may also be included:
[0109] Step 1104: the electronic device 100 sends the data of the application through the second Wi-Fi interface from the second Wi-Fi link, wherein the IP address carried in the data sent through the second Wi-Fi interface is the IP address corresponding to the second Wi-Fi interface.
[0110] Since the status of the second Wi-Fi link is normal, the data sent by the application in the electronic device 100 through the second Wi-Fi interface will still be sent through the second Wi-Fi link.
[0111] In the above data sending method, the electronic device 100 sends the application data from the first Wi-Fi link through the first Wi-Fi interface. In response to detecting that the state of the first Wi-Fi link is abnormal, the electronic device 100 establishes a connection between the first Wi-Fi interface and the second Wi-Fi physical channel, and the electronic device 100 sends the above application data from the second Wi-Fi link through the first Wi-Fi interface. Among them, the IP address carried in the data sent through the first Wi-Fi interface is the IP address corresponding to the first Wi-Fi interface, so that when a Wi-Fi link state is abnormal (for example: a failure or excessive load), dual Wi-Fi link smooth routing can be achieved, allowing users (applications) to use the dual Wi-Fi link characteristics unconsciously, quickly and stably, and no special application adaptation is required, thereby improving the problem of poor service experience caused by an abnormal state of a Wi-Fi link.
[0112] Fig.12 A flowchart of a data sending method provided in another embodiment of the present application is as follows: Fig.12 As shown, this application Fig.11 In the illustrated embodiment, after step 1103, the following steps may also be included:
[0113] Step 1201: In response to detecting that the state of the first Wi-Fi link has returned to normal, the electronic device 100 establishes a connection between the first Wi-Fi interface and the first Wi-Fi physical channel. Then, step 1202 or step 1203 is executed.
[0114] In addition, in response to detecting that the state of the first Wi-Fi link returns to normal, the electronic device 100 determines that the first Wi-Fi module and the second Wi-Fi module are switched from the shared mode to the exclusive mode.
[0115] Step 1202, the electronic device 100 sends the data of the above application from the first Wi-Fi link via the first Wi-Fi interface. As described above, the IP address carried in the data sent via the first Wi-Fi interface is the IP address corresponding to the first Wi-Fi interface.
[0116] Step 1203: The electronic device 100 sends the application data from the second Wi-Fi link via the second Wi-Fi interface.
[0117] The IP address carried in the data sent through the second Wi-Fi interface is the IP address corresponding to the second Wi-Fi interface.
[0118] That is to say, in this embodiment, after the status of the first link returns to normal, the first Wi-Fi module negotiates with the second Wi-Fi module to restore the working mode to the exclusive mode, that is, the first Wi-Fi interface and the second Wi-Fi interface respectively use their original physical channels. In this way, the data sent by the application through the first Wi-Fi interface is forwarded by the first Wi-Fi link, and the data sent by the application through the second Wi-Fi interface is forwarded by the second Wi-Fi link.
[0119] In addition, it should be noted that this application Fig.11 Before step 1101 of the illustrated embodiment, the electronic device 100 may also establish a first Wi-Fi link on the first Wi-Fi physical channel through the first Wi-Fi module; and establish a second Wi-Fi link on the second Wi-Fi physical channel through the second Wi-Fi module; establish a connection between the first Wi-Fi interface and the first Wi-Fi physical channel, and establish a connection between the second Wi-Fi interface and the second Wi-Fi physical channel.
[0120] Furthermore, before establishing a connection between the first Wi-Fi interface and the first Wi-Fi physical channel and establishing a connection between the second Wi-Fi interface and the second Wi-Fi physical channel, the electronic device 100 may also determine that the first Wi-Fi module and the second Wi-Fi module are operating in exclusive mode. That is, in this embodiment, the dual Wi-Fi links are initially established to operate in exclusive mode, and only when the status of one of the Wi-Fi links is abnormal will they negotiate to operate in shared mode, and forward the data of the abnormal Wi-Fi link through the other Wi-Fi link, so that the application can use the characteristics of the dual Wi-Fi links imperceptibly, quickly, and stably, without the need for special application adaptation.
[0121] It is to be understood that some or all of the steps or operations in the above embodiments are merely examples, and the present application embodiments may also perform other operations or variations of various operations. In addition, the various steps may be performed in different orders presented in the above embodiments, and it is possible that not all of the operations in the above embodiments need to be performed.
[0122] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.
[0123] This embodiment can divide the electronic device into functional modules according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0124] Fig.13 This is a schematic diagram of the structure of an electronic device provided in another embodiment of the present application. In this embodiment, the electronic device 1300 is provided with a first Wi-Fi module and a second Wi-Fi module. When each functional module is divided into corresponding functional modules, Fig.13 A possible schematic diagram of the composition of the electronic device 1300 involved in the above embodiment is shown. Fig.13 As shown, the electronic device 1300 may include: a sending module 1301 and a establishing module 1302;
[0125] The sending module 1301 is used to send application data from a first Wi-Fi link through a first Wi-Fi interface, where the first Wi-Fi link is established by the electronic device on a first Wi-Fi physical channel through a first Wi-Fi module;
[0126] An establishing module 1302 is configured to establish a connection between the first Wi-Fi interface and the second Wi-Fi physical channel in response to detecting that the state of the first Wi-Fi link is abnormal;
[0127] The sending module 1301 is also used to send the data of the above-mentioned application from the second Wi-Fi link through the first Wi-Fi interface; wherein the above-mentioned second Wi-Fi link is established by the electronic device 100 on the second Wi-Fi physical channel through the second Wi-Fi module, and the IP address carried in the data sent through the first Wi-Fi interface is the IP address corresponding to the first Wi-Fi interface.
[0128] It should be noted that this application Fig.11 All relevant contents of each step involved in the illustrated method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0129] The electronic device 1300 provided in this embodiment is used to execute the present application Fig.11 The data sending method provided by the illustrated embodiment can therefore achieve the same effect as the above method.
[0130] Fig.14 A schematic diagram of the structure of an electronic device provided in another embodiment of the present application, Fig.13The electronic device shown is different in that Fig.14 The electronic device 1300 shown may further include: a determination module 1303;
[0131] The determining module 1303 is configured to determine that the first Wi-Fi module and the second Wi-Fi module switch to a sharing mode in response to detecting that the state of the first Wi-Fi link is abnormal.
[0132] The sending module 1301 is further configured to send the data of the application from the second Wi-Fi link through the second Wi-Fi interface after the establishing module 1302 establishes a connection between the first Wi-Fi interface and the second Wi-Fi physical channel; wherein the IP address carried in the data sent through the second Wi-Fi interface is the IP address corresponding to the second Wi-Fi interface.
[0133] The establishing module 1302 is further configured to establish a connection between the first Wi-Fi interface and the first Wi-Fi physical channel in response to detecting that the state of the first Wi-Fi link has returned to normal after the sending module 1301 sends the data of the application from the second Wi-Fi link through the first Wi-Fi interface;
[0134] The sending module 1301 is further configured to send the data of the above application from the first Wi-Fi link via the first Wi-Fi interface.
[0135] The determination module 1303 is further configured to determine, in response to detecting that the state of the first Wi-Fi link returns to normal, whether the first Wi-Fi module and the second Wi-Fi module are switched from the shared mode to the exclusive mode.
[0136] The sending module 1301 is further used to send the data of the above application from the second Wi-Fi link through the second Wi-Fi interface after the establishing module 1303 establishes a connection between the first Wi-Fi interface and the first Wi-Fi physical channel; wherein the IP address carried in the data sent through the second Wi-Fi interface is the IP address corresponding to the second Wi-Fi interface.
[0137] In an implementation of this embodiment, the abnormal state of the first Wi-Fi link includes that the first Wi-Fi link fails; the electronic device 1300 may further include:
[0138] The shielding module 1304 is configured to shield the fault reporting of the first Wi-Fi link in response to detecting that the first Wi-Fi link has a fault.
[0139] In another implementation of this embodiment, the abnormal state of the first Wi-Fi link includes that a load of the first Wi-Fi link is greater than or equal to a predetermined load threshold.
[0140] Furthermore, the establishing module 1302 is also used to establish a first Wi-Fi link on the first Wi-Fi physical channel through the first Wi-Fi module before the sending module 1301 sends the application data from the first Wi-Fi link through the first Wi-Fi interface; and establish a second Wi-Fi link on the second Wi-Fi physical channel through the second Wi-Fi module; establish a connection between the first Wi-Fi interface and the first Wi-Fi physical channel, and establish a connection between the second Wi-Fi interface and the second Wi-Fi physical channel.
[0141] The determining module 1303 is further configured to determine that the first Wi-Fi module and the second Wi-Fi module operate in exclusive mode before the establishing module 1302 establishes a connection between the first Wi-Fi interface and the first Wi-Fi physical channel and establishes a connection between the second Wi-Fi interface and the second Wi-Fi physical channel.
[0142] It should be noted that this application Figure 11-12 All relevant contents of each step involved in the illustrated method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0143] The electronic device 1300 provided in this embodiment is used to execute the present application Figure 11-12 The data sending method provided by the illustrated embodiment can therefore achieve the same effect as the above method.
[0144] It should be understood that the electronic device 1300 may correspond to Figure 4 The electronic device 100 shown in FIG. The function of the sending module 1301 can be Figure 4 The processor 110, antenna 2 and wireless communication module 160 in the electronic device 100 are implemented; the functions of the establishment module 1302, the determination module 1303 and the shielding module 1304 can be implemented by Figure 1 The processor 110 and the wireless communication module 160 in the electronic device 100 are shown to be implemented.
[0145] In the case of adopting an integrated unit, the electronic device 1300 may include a processing module, a storage module, and a communication module.
[0146] The processing module can be used to control and manage the actions of the electronic device 1300, for example, it can be used to support the electronic device 1300 to execute the steps executed by the above modules. The storage module can be used to support the electronic device 1300 to store program codes and data, etc. The communication module can be used to support the communication between the electronic device 1300 and other devices.
[0147] Among them, the processing module can be a processor or a controller, which can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip and / or a Wi-Fi chip.
[0148] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device 1300 involved in this embodiment can be a Figure 4 Device of the structure shown.
[0149] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the present application. Figure 8 to Figure 12 The method provided by the illustrated embodiment.
[0150] The present application also provides a computer program product, which includes a computer program, which, when executed on a computer, enables the computer to execute the present application. Figure 8 to Figure 12 The method provided by the illustrated embodiment.
[0151] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0152] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0154] In several embodiments provided in the present application, any function can be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform 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 read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0155] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A data transmission method, characterized in that: Applied to an electronic device, the electronic device includes a first wireless fidelity Wi-Fi module and a second Wi-Fi module, and the method includes: Sending application data from a first Wi-Fi link through a first Wi-Fi interface, where the first Wi-Fi link is established by the electronic device through the first Wi-Fi module on a first Wi-Fi physical channel; In response to detecting that the state of the first Wi-Fi link is abnormal, establishing a connection between the first Wi-Fi interface and a second Wi-Fi physical channel; The data of the application is sent from the second Wi-Fi link through the first Wi-Fi interface; wherein the second Wi-Fi link is established by the electronic device on the second Wi-Fi physical channel through the second Wi-Fi module, and the IP address carried in the data sent through the first Wi-Fi interface is the IP address corresponding to the first Wi-Fi interface.
2. The method according to claim 1, characterized in that Also includes: In response to detecting that the state of the first Wi-Fi link is abnormal, determining that the first Wi-Fi module and the second Wi-Fi module are switched to a sharing mode.
3. The method according to claim 1, characterized in that After establishing a connection between the first Wi-Fi interface and the second Wi-Fi physical channel, the method further includes: The data of the application is sent from the second Wi-Fi link through the second Wi-Fi interface; wherein the IP address carried in the data sent through the second Wi-Fi interface is the IP address corresponding to the second Wi-Fi interface.
4. The method according to claim 1, characterized in that: After sending the data of the application from the second Wi-Fi link through the first Wi-Fi interface, the method further includes: In response to detecting that the state of the first Wi-Fi link returns to normal, establishing a connection between the first Wi-Fi interface and the first Wi-Fi physical channel; The data of the application is sent from the first Wi-Fi link through the first Wi-Fi interface.
5. The method according to claim 4, characterized in that Also includes: In response to detecting that the state of the first Wi-Fi link returns to normal, determining that the first Wi-Fi module and the second Wi-Fi module are switched from a shared mode to an exclusive mode.
6. The method according to claim 4, characterized in that After establishing a connection between the first Wi-Fi interface and the first Wi-Fi physical channel, the method further includes: The data of the application is sent from the second Wi-Fi link through the second Wi-Fi interface; wherein the IP address carried in the data sent through the second Wi-Fi interface is the IP address corresponding to the second Wi-Fi interface.
7. The method according to any one of claims 1 to 6, characterized in that: The abnormal state of the first Wi-Fi link includes a failure of the first Wi-Fi link; The method further comprises: In response to detecting that a failure occurs on the first Wi-Fi link, blocking failure reporting of the first Wi-Fi link.
8. The method according to any one of claims 1 to 6, characterized in that: The abnormal state of the first Wi-Fi link includes that a load of the first Wi-Fi link is greater than or equal to a predetermined load threshold.
9. The method according to claim 1, characterized in that: Before sending the application data from the first Wi-Fi link through the first Wi-Fi interface, the method further includes: Establishing the first Wi-Fi link on a first Wi-Fi physical channel through the first Wi-Fi module; and establishing the second Wi-Fi link on a second Wi-Fi physical channel through the second Wi-Fi module; Establish a connection between the first Wi-Fi interface and the first Wi-Fi physical channel, and establish a connection between the second Wi-Fi interface and the second Wi-Fi physical channel.
10. The method according to claim 9, characterized in that Before establishing a connection between the first Wi-Fi interface and the first Wi-Fi physical channel and establishing a connection between the second Wi-Fi interface and the second Wi-Fi physical channel, the method further includes: It is determined that the first Wi-Fi module and the second Wi-Fi module operate in an exclusive mode.
11. An electronic device, characterized in that: The electronic device is provided with a first wireless fidelity Wi-Fi module and a second Wi-Fi module, and the electronic device comprises: a sending module, configured to send application data from a first Wi-Fi link through a first Wi-Fi interface, where the first Wi-Fi link is established by the electronic device through the first Wi-Fi module on a first Wi-Fi physical channel; an establishing module, configured to establish a connection between the first Wi-Fi interface and a second Wi-Fi physical channel in response to detecting that the state of the first Wi-Fi link is abnormal; The sending module is further used to send the data of the application from a second Wi-Fi link through the first Wi-Fi interface; wherein the second Wi-Fi link is established by the electronic device on the second Wi-Fi physical channel through the second Wi-Fi module, and the IP address carried in the data sent through the first Wi-Fi interface is the IP address corresponding to the first Wi-Fi interface.
12. An electronic device, characterized in that: include: one or more processors; Memory; Multiple applications; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to perform the method as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 10.