Link switching method, system, and related device
By dynamically switching the routing of logical interfaces in electronic devices, link switching is achieved, which solves the problem of high power consumption during high-precision transmission and data problems during link switching, reduces power consumption and avoids data loss and freezes. It is suitable for a variety of scenarios. .
Patent Information
- Application Number
- PCT/CN2024/085020
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-31
- Filing Date
- 2024-03-29
- Publication Date
- 2024-10-03
AI Technical Summary
Existing technologies require a high-precision P2P link to be maintained at all times during the data transmission process, resulting in excessive power consumption and prone to data lag or loss during link switching.
By implementing the link switching method in electronic equipment, the routing settings of the logical interface are used to switch physical links and dynamically dismantle and build links to avoid maintaining multiple physical links all the time and achieve seamless link switching.
It reduces power consumption, avoids data freezes and losses, and achieves seamless link switching. It is suitable for scenarios such as screen projection, multi-device collaboration, and shared Internet access.
Smart Images

Figure CN2024085020_03102024_PF_FP_ABST
Abstract
Description
Link switching method, system and related device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 31, 2023, with application number 202310379844.0 and application name “A link switching method, system and related devices”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a link switching method, system and related devices. Background Art
[0003] With the continuous advancement of communication technology, data transmission between electronic devices is becoming increasingly frequent. During data transmission, multiple links can be established between the sender (the electronic device sending the data) and the receiver (the electronic device receiving the data). The sender can transmit the target data through one of these links. If the current link cannot meet the transmission requirements, the sender needs to switch to another link.
[0004] Taking the screen projection scenario as an example, a LAN link and a Wi-Fi peer-to-peer (P2P) link can be established between the sender and the receiver. The P2P link has higher transmission accuracy and requires higher power consumption. During the screen projection process, the sender can always maintain the P2P link and the LAN link between the sender and the receiver. In this way, when the sender determines that high-precision transmission of the target data is not required, the sender can transmit the target data through the LAN link; when the sender determines that high-precision transmission of the target data is required, the sender can transmit the target data through the P2P link.
[0005] However, the above method requires that the P2P link be maintained throughout the data transmission process, which consumes too much power.
[0006] Summary of the Invention
[0007] The present application provides a link switching method, system and related devices, which realize seamless switching of links during data transmission and save power consumption.
[0008] In a first aspect, the present application provides a link switching method, which is applied to a first electronic device, the first electronic device including a first logical interface, a first physical interface and a third physical interface; the method includes: calling the first logical interface to send data to the second electronic device through the first link, the first link being a physical link between the first physical interface and the second physical interface of the second electronic device, a logical link being established between the first logical interface and the second logical interface of the second electronic device, and the route from the first logical interface to the second logical interface being set to the address of the second physical interface; detecting that the first condition is met, setting the route from the first logical interface to the second logical interface to the address of the fourth physical interface in the second electronic device; calling the first logical interface to send data to the second electronic device through the second link, the second link being a physical link between the third physical interface and the fourth physical interface.
[0009] In this way, there is no need to always maintain multiple physical links. Moreover, link switching only requires changing the route from the first logical interface to the second logical interface, which can avoid data jamming and loss, and achieve seamless link switching.
[0010] In a possible implementation, before setting the route from the first logical interface to the second logical interface as the address of the fourth physical interface in the second electronic device, the method further includes: establishing a second link between the third physical interface and the fourth physical interface.
[0011] In this way, when it is detected that the first condition is met, the establishment of the second link can be triggered.
[0012] In a possible implementation, after calling the first logical interface to send data to the second electronic device through the second link, the method further includes: disconnecting the first link with the second electronic device.
[0013] In this way, the first link can be disconnected when data does not need to be transmitted through the first link.
[0014] In a possible implementation, before calling the first logical interface to send data to the second electronic device through the first link, the method further includes: establishing the first link between the first physical interface and the second physical interface.
[0015] In one possible implementation, calling the first logical interface to send data to the second electronic device through the first link specifically includes: when the first electronic device adopts the first projection mode to project the screen to the second electronic device, calling the first logical interface to send data to the second electronic device through the first link; the first condition includes: switching the first projection mode to the second projection mode, and the first projection mode is different from the second projection mode.
[0016] In a possible implementation, the first screen projection mode is a streaming mode, the second screen projection mode is a mirroring mode, the first link is a local area network link, and the second link is a point-to-point P2P link.
[0017] In this way, in the screen projection scenario, the link for transmitting data can be switched by switching the screen projection mode.
[0018] In one possible implementation, the first condition includes: receiving an operation of a user switching link; and / or the first link is interfered with; and / or when the bandwidth of the first link is less than the bandwidth of the second link, the amount of data is greater than a preset value; and / or the transmission rate of the first link is less than a preset rate; and / or the transmission quality of the first link is lower than a preset quality.
[0019] In one possible implementation, the method further includes: detecting that the second condition is met, setting the route from the first logical interface to the second logical interface to the address of the second physical interface; and calling the first logical interface to send data to the second electronic device through the first link.
[0020] In one possible implementation, the second condition includes: receiving an operation of a user switching link; and / or the second link is interfered with; and / or when the bandwidth of the second link is less than the bandwidth of the first link, the amount of data is greater than a preset value; and / or the transmission rate of the second link is less than a preset rate; and / or the transmission quality of the second link is lower than a preset quality.
[0021] In this way, during the process of transmitting data through the second link, if it is detected that the second condition is met, the first electronic device can switch the transmission link back to the first link.
[0022] In one possible implementation, the first electronic device also includes a fifth physical interface; the method also includes: detecting that the third condition is met, setting the route from the first logical interface to the second logical interface to the address of the sixth physical interface in the second electronic device; calling the first logical interface to send data to the second electronic device through a third link, where the third link is a physical link between the fifth physical interface and the sixth physical interface.
[0023] In this way, during the process of transmitting data through the first link or the second link, if it is detected that the third condition is met, the first electronic device can switch the transmission link to the third link.
[0024] In one possible implementation, the third condition includes: receiving an operation of a user switching link; and / or, the first link is interfered with; and / or, when the bandwidth of the first link is less than the bandwidth of the third link, the amount of data is greater than a preset value; and / or, the transmission rate of the first link is less than a preset rate; and / or, the transmission quality of the first link is lower than a preset quality; and / or, the third link has the highest priority or weight.
[0025] In a possible implementation, before setting the route from the first logical interface to the second logical interface as the address of the fourth physical interface in the second electronic device, the method further includes: acquiring the address of the fourth physical interface through the first link or the second link.
[0026] In a possible implementation, before setting the route from the first logical interface to the second logical interface as the address of the second physical interface in the second electronic device, the method further includes: acquiring the address of the second physical interface through the first link.
[0027] In a second aspect, the present application provides a multi-link transmission system, comprising: a first electronic device and a second electronic device, the first electronic device comprising a first logical interface, a first physical interface, and a third physical interface, and the second electronic device comprising a second logical interface, a second physical interface, and a fourth physical interface;
[0028] The first electronic device is configured to call a first logical interface to send data to the second electronic device via a first link, where the first link is a physical link between the first physical interface and the second physical interface, a logical link is established between the first logical interface and the second logical interface, and a route from the first logical interface to the second logical interface is the address of the second physical interface;
[0029] The first electronic device is configured to detect whether a first condition is met, and if the first condition is met, the first electronic device is configured to set a route from the first logical interface to the second logical interface to the address of the fourth physical interface in the second electronic device;
[0030] The first electronic device is used to call the first logical interface to send data to the second electronic device through the second link, where the second link is a physical link between the third physical interface and the fourth physical interface;
[0031] The second electronic device is used to receive data sent by the first electronic device.
[0032] In a possible implementation, before setting the route from the first logical interface to the second logical interface to the address of the fourth physical interface in the second electronic device, the first electronic device is further configured to establish a second link between the third physical interface and the fourth physical interface.
[0033] In a possible implementation, after calling the first logical interface to send data to the second electronic device through the second link, the first electronic device is further configured to disconnect the first link between the first electronic device and the second electronic device.
[0034] In a possible implementation, before calling the first logical interface to send data to the second electronic device through the first link, the first electronic device is further configured to establish a first link between the first physical interface and the second physical interface.
[0035] In one possible implementation, when the first electronic device is used to project the screen to the second electronic device using the first projection mode, the first logical interface is called to send data to the second electronic device through the first link; the first condition includes: switching the first projection mode to the second projection mode, and the first projection mode is different from the second projection mode.
[0036] In a possible implementation, the first screen projection mode is a streaming mode, the second screen projection mode is a mirroring mode, the first link is a local area network link, and the second link is a point-to-point P2P link.
[0037] In one possible implementation, the first condition includes: receiving an operation of a user switching link; and / or the first link is interfered with; and / or when the bandwidth of the first link is less than the bandwidth of the second link, the amount of data is greater than a preset value; and / or the transmission rate of the first link is less than a preset rate; and / or the transmission quality of the first link is lower than a preset quality.
[0038] In one possible implementation, the first electronic device is further configured to detect that the second condition is satisfied and set the route from the first logical interface to the second logical interface to the address of the second physical interface; the first electronic device is further configured to call the first logical interface to send data to the second electronic device through the first link.
[0039] In one possible implementation, the second condition includes: receiving an operation of a user switching link; and / or the second link is interfered with; and / or when the bandwidth of the second link is less than the bandwidth of the first link, the amount of data is greater than a preset value; and / or the transmission rate of the second link is less than a preset rate; and / or the transmission quality of the second link is lower than a preset quality.
[0040] In one possible implementation, the first electronic device also includes a fifth physical interface; the second electronic device also includes a sixth physical interface; the first electronic device is further used to detect that a third condition is satisfied, and set the route from the first logical interface to the second logical interface to the address of the sixth physical interface in the second electronic device; the first electronic device is further used to call the first logical interface to send data to the second electronic device through a third link, where the third link is a physical link between the fifth physical interface and the sixth physical interface.
[0041] In one possible implementation, the third condition includes: receiving an operation of a user switching link; and / or, the first link is interfered with; and / or, when the bandwidth of the first link is less than the bandwidth of the third link, the amount of data is greater than a preset value; and / or, the transmission rate of the first link is less than a preset rate; and / or, the transmission quality of the first link is lower than a preset quality; and / or, the third link has the highest priority or weight.
[0042] In a possible implementation, before setting the route from the first logical interface to the second logical interface as the address of the fourth physical interface in the second electronic device, the first electronic device is further configured to obtain the address of the fourth physical interface through the first link or the second link.
[0043] In a possible implementation, before the route from the first logical interface to the second logical interface is set as the address of the second physical interface in the second electronic device, the first electronic device is further configured to obtain the address of the second physical interface through the first link.
[0044] In a third aspect, the present application provides an electronic device, which is a first electronic device, comprising one or more processors, one or more memories, and multiple physical interfaces. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, the computer program code including computer instructions. When the one or more processors execute the computer instructions, the communication device performs the link switching method in any possible implementation of any of the above aspects.
[0045] In a fourth aspect, an embodiment of the present application provides a computer storage medium comprising computer instructions. When the computer instructions are executed on a first electronic device, the first electronic device executes the link switching method in any possible implementation of any of the above aspects.
[0046] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a first electronic device, the first electronic device executes the link switching method in any possible implementation of any of the above aspects.
[0047] The beneficial effects of the second to fifth aspects can refer to the beneficial effects of the first aspect mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] FIG1 is a schematic diagram of a communication network provided in an embodiment of the present application;
[0049] FIG2 is a schematic diagram of the system architecture of a multi-link transmission system 10 provided in an embodiment of the present application;
[0050] FIG3A is a schematic diagram of a communication connection between an interface of an electronic device 100 and an interface of an electronic device 200 provided in an embodiment of the present application;
[0051] FIG3B is a schematic diagram illustrating a connection between a screen projection application and a physical interface in an electronic device 100 provided in an embodiment of the present application;
[0052] FIG3C is a schematic diagram of a communication connection between an interface of another electronic device 100 and an interface of an electronic device 200 provided in an embodiment of the present application;
[0053] 4A-4B are schematic diagrams of a model of a link switching method provided in an embodiment of the present application;
[0054] FIG5 is a schematic diagram of a flow chart of a link switching method provided in an embodiment of the present application;
[0055] FIG6 is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;
[0056] FIG7 is a schematic diagram of a software architecture of an electronic device 100 provided in an embodiment of the present application;
[0057] FIG8 is a schematic flow chart of a link switching method performed by a first electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0058] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0059] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0060] To facilitate understanding of the embodiments of the present application, some professional terms involved in the embodiments of the present application are explained below.
[0061] Physical interface: The interface that actually exists on an electronic device.
[0062] Logical interface: A logical interface is a virtual interface that can implement data exchange functions but does not physically exist and needs to be established through configuration. In the embodiments of the present application, a logical interface can correspond to multiple physical interfaces. When another electronic device can establish a communication connection with any of the multiple physical interfaces, the other electronic device can communicate with the logical interface through the communication connection.
[0063] Physical link: A physical link is a communication connection between electronic devices based on a physical interface. It is a real link that can be used to transmit data and enable mutual communication between electronic devices.
[0064] Logical link: A logical link is a communication connection between electronic devices based on a logical interface, and is not a real link. In the embodiment of the present application, a logical link can enable mutual communication between electronic devices through a physical link.
[0065] Routing: Routing, also known as routing information, is information going to a destination and is used to indicate the direction to the destination.
[0066] Wireless Fidelity (Wi-Fi) technology: Wi-Fi is the most widely used wireless network transmission technology today. Wi-Fi is a trademark of the Wi-Fi Alliance used as a manufacturer's brand certification for products. It is a wireless local area network technology based on the IEEE 802.11 standard. Due to the close relationship between the two systems, Wi-Fi is often used as a synonym for the IEEE 802.11 standard.
[0067] Wireless local area network (WLAN): A WLAN uses wireless communication technology to interconnect electronic devices, forming a network system that enables communication and resource sharing. The essential characteristic of a WLAN is that it replaces the use of cables to connect electronic devices to the network. Instead, it connects wirelessly, making network construction and electronic device mobility more flexible.
[0068] Wireless access point (AP): A WLAN system may include an AP and station electronic devices. The AP may be used to access an external network. For example, the AP may be a home router.
[0069] Station device, also called station (STA): A WLAN system may include APs and STAs, and STAs may access the network through APs.
[0070] WLAN basic service set (WLAN BSS): WLAN BSS is a basic service unit of a WLAN network.
[0071] Wi-Fi peer-to-peer (P2P, also known as Wi-Fi direct): Wi-Fi peer-to-peer technology, also known as peer-to-peer (P2P) technology, is a Wi-Fi-based point-to-point connection technology launched by the Wi-Fi Alliance. This point-to-point connection technology allows electronic devices to connect directly to each other, allowing electronic devices to communicate one-to-one or one-to-many without the need for a local area network or access point (AP). For wireless electronic devices that support Wi-Fi, this point-to-point connection technology supports wireless electronic devices to interconnect in a point-to-point manner, similar to Bluetooth. Compared with Bluetooth, this connection has significantly improved transmission speed and transmission distance, and its power consumption is also higher than Bluetooth.
[0072] Peer-to-peer network (P2P group): Two electronic devices can establish a P2P protocol connection (also called a P2P connection) between them, forming a peer-to-peer network. In a P2P network, one electronic device acts as the traditional access point (AP), known as the group owner (GO). The other electronic device is known as a group client (GC). The GC can connect to the GO just like an AP. A peer-to-peer network can also include multiple GCs, meaning that the GO and GC can be connected one-to-one or one-to-many.
[0073] P2P link: A P2P protocol connection established between two electronic devices based on P2P technology can also be called a P2P link.
[0074] LAN link: A physical link that can be used for communication between any two electronic devices in a WLAN network can be called a LAN link.
[0075] Wi-Fi link: A Wi-Fi connection between two electronic devices established using Wi-Fi technology can also be referred to as a Wi-Fi link. A broadly defined Wi-Fi link can include the aforementioned P2P link. In some embodiments, the communication connection between electronic devices in a WLAN network is a Wi-Fi connection established using traditional Wi-Fi technology. In this case, the broadly defined Wi-Fi link can also include the aforementioned LAN link.
[0076] P2P technology and traditional Wi-Fi technology are not mutually exclusive. A GO can provide services to several GCs like an AP. At the same time, a GO can also be an AP in a WLAN network, or connect to other APs as a STA in a WLAN network.
[0077] For example, as shown in Figure 1, a peer-to-peer network may include electronic device a and electronic device b, and a P2P protocol connection is established between electronic device a and electronic device b using P2P technology. In this peer-to-peer network, electronic device a may be a GO and electronic device b may be a GC. A wireless local area network basic service set (WLAN basic service set, WLAN BSS) may include electronic device a and electronic device c, and a Wi-Fi connection is established between electronic device a and electronic device c using Wi-Fi technology. In the WLAN BSS, electronic device c is an AP and electronic device a is an STA.
[0078] As shown in Figure 1, the same electronic device can establish communication connections with other electronic devices using different communication technologies in different communication networks, forming different types of links. Furthermore, the same electronic device can also play different roles in different communication networks. It is understood that electronic devices A and B can also establish other types of links, such as Bluetooth links, and this application does not limit this.
[0079] The following describes a multi-link transmission system provided by an embodiment of the present application.
[0080] FIG2 shows the system architecture of the multi-link transmission system 10 .
[0081] As shown in FIG2 , the multi-link transmission system 10 may include an electronic device 100, an electronic device 200, and an electronic device 300. A communication connection may be established between the electronic device 100 and the electronic device 200. The electronic device 100 and the electronic device 200 may also establish a communication connection with the electronic device 300, respectively. In some embodiments, the communication connection between the electronic device 100 and the electronic device 200 may be a P2P protocol connection. The electronic devices 100, 200, and 300 may form a WLAN network with the electronic device 300 as an AP and the other electronic devices as STAs. In the WLAN network, the communication connection between the electronic device 100 and the electronic device 300, and the communication connection between the electronic device 200 and the electronic device 300 may be a Wi-Fi connection.
[0082] In the above case, the link between the electronic device 100 and the electronic device 200 may include two links: a local area network link and a P2P link. The P2P link is a P2P protocol connection between the electronic device 100 and the electronic device 200, and the local area network link is a Wi-Fi connection between the electronic device 100 and the electronic device 300 and a Wi-Fi connection between the electronic device 300 and the electronic device 200. When the electronic device 100 transmits target data along the local area network link, the electronic device 100 can send the target data to the electronic device 300 through the Wi-Fi connection between the electronic device 100 and the electronic device 300, and then send the target data to the electronic device 200 through the Wi-Fi connection between the electronic device 300 and the electronic device 200. When the electronic device 100 transmits target data along the P2P link, the electronic device 100 can send the target data to the electronic device 200 through the P2P connection between the electronic device 100 and the electronic device 200.
[0083] In the multi-link transmission system 10, the electronic device 100 may be the smartphone shown in FIG2 , the electronic device 200 may be the smart TV shown in FIG2 , and the electronic device 300 may be the router shown in FIG2 . In some embodiments, the electronic devices 100 , 200 , and 300 may be different types of electronic devices from those in the embodiment shown in FIG2 , and this application does not limit this.
[0084] It is understood that the embodiment shown in FIG2 is merely an example of how multiple links can exist between electronic device 100 and electronic device 200. In the embodiment of the present application, the P2P link and local area network link between electronic device 100 and electronic device 200 can also be replaced with other links (such as a Bluetooth link). In addition, there can be more than two links between electronic device 100 and electronic device 200, and the multi-link transmission system 10 can also include more or fewer electronic devices, which is not limited in this application.
[0085] It should be noted that any link between electronic device 100 and electronic device 200 can be dynamically established and dismantled. That is, when the link is needed for data transmission, the link is established, and when it is no longer needed, the link can be disconnected. In this way, during the data transmission process, there is no need to always maintain multiple links, which can reduce power consumption.
[0086] During the process of transmitting target data from electronic device 100 to electronic device 200, for example, in data transmission scenarios involving multiple links, such as screen projection, shared Internet access, multi-device collaboration, and service synchronization of distributed devices, electronic device 100 needs to switch the link for transmitting data (hereinafter referred to as the transmission link) due to different requirements for power consumption, transmission quality, transmission speed, and other factors in different scenarios, such as switching link 1 to link 2, or switching link 2 to link 1. During the link switching process, problems such as data loss or data jamming may occur.
[0087] The following describes link switching during data transmission, using a screen projection scenario. In this scenario, Link 1 can be a LAN link, and Link 2 can be a P2P link. P2P links offer higher link quality and lower latency, but require higher power consumption to maintain. LAN links, on the other hand, offer lower link quality than P2P links, but require much lower power consumption to maintain.
[0088] In the scenario where the electronic device 100 projects the screen to the electronic device 200, the electronic device 100 can project the screen to the electronic device 200 in streaming mode or mirroring mode. Among them, the mirroring mode is to capture the local screen, or some specific applications draw, encode and send it to the receiving end for decoding and display. The electronic device 100 and the electronic device 200 can project the screen in mirroring mode based on any one of the screen projection protocols such as miracast, cast+, and airplay. The streaming mode is that the electronic device 100 sends the resource to be played or the address of the resource to be played to the electronic device 200, and the electronic device 200 can use the default player to play the resource to be played after obtaining the resource to be played. The streaming mode does not require encoding. When the electronic device 100 and the electronic device 200 are in the same local area network, the electronic device 100 and the electronic device 200 can project the screen in streaming mode based on any one of the screen projection protocols such as DLNA and airplay.
[0089] Since mirroring mode has higher requirements for link quality and latency of data transmission, while streaming mode only needs to ensure successful data transmission, when electronic device 100 uses mirroring mode to project its screen to electronic device 200, electronic device 100 can choose a link with higher link quality, that is, transmit the target data through the P2P link between electronic devices 100 and 200. When electronic device 100 uses streaming mode to project its screen to electronic device 200, electronic device 100 can choose a link with lower power consumption, that is, transmit the target data through the local area network link between electronic devices 100 and 200.
[0090] During the process of projecting the screen to the electronic device 200, the electronic device 100 can switch between mirror mode and streaming mode. For example, when the electronic device 100 detects the user's operation of switching the screen projection mode (for example, the operation of playing a video, the first input operation on the screen projection mode control, or the operation of opening a video application), the screen can be projected in streaming mode; when the electronic device 100 detects the user's operation of switching the screen projection mode (for example, the second input operation on the screen projection mode control, the operation of exiting the video playback interface, or the operation of exiting the video application, etc.), it can switch from streaming mode to mirror mode, etc. Therefore, when the electronic device 100 switches the screen projection mode from mirror mode to streaming mode, it is necessary not only to switch the screen projection protocol but also to switch the transmission link, that is, to switch the transmission link from a P2P link to a local area network link; when the electronic device 100 switches the screen projection mode from streaming mode to mirror mode, it is necessary to switch the transmission link from a local area network link to a P2P link.
[0091] FIG3A shows a schematic diagram of a communication connection between an interface of electronic device 100 and an interface of electronic device 200 in a screen projection scenario.
[0092] As shown in Figure 3A, the electronic device 100 may include at least two physical interfaces, which may include interface P2P-0-1 and interface wlan0. Interface P2P-0-1 is a P2P interface that can be used to establish a P2P link. The P2P interface can be a physical interface configured by the electronic device 100 when triggering the establishment of a P2P link. Interface wlan0 is a WLAN interface that can be used to establish a local area network link. Among them, the Internet Protocol (IP) address of interface P2P-0-1 can be 192.168.43.1, and the IP address of interface wlan0 can be 7.247.142.86. It should be noted that the IP addresses here are only examples. In actual application scenarios, the IP addresses of the interfaces can also be different IP addresses. The embodiments of the present application do not limit the specific IP addresses.
[0093] Electronic device 200 may include at least two physical interfaces, which may include interface P2P-1-1 and interface wlan1. In electronic device 200, the IP address of interface P2P-1-1 may be 192.168.43.30, and the IP address of interface wlan1 may be 7.247.142.86. Electronic device 100 may establish a local area network link between interface wlan0 and interface wlan1 in electronic device 200. Similarly, electronic device 100 may also establish a P2P link between interface P2P-0-1 and interface P2P-1-1.
[0094] FIG3B shows a schematic diagram of the connection relationship between the screen projection application and the physical interface inside the electronic device 100 .
[0095] As shown in Figure 3B, in the electronic device 100, the screen casting application can establish socket 1 with the interface P2P-0-1, and the screen casting application can establish socket 2 with the interface wlan0. When the electronic device 100 transmits target data through the P2P link, the screen casting application can send the target data to the interface P2P-0-1 through socket 1, and then transmit it from the interface P2P-0-1 to the electronic device 200 through the P2P link between the electronic device 200. When the electronic device 100 transmits target data through the LAN link, the screen casting application can send the target data to the interface wlan0 through socket 2, and then transmit it from the interface wlan0 to the electronic device 200 through the LAN link between the electronic device 200.
[0096] In some embodiments, the electronic device 100 can simultaneously maintain the LAN link and the P2P link between the electronic device 100 and the electronic device 200 shown in FIG3A. For example, the electronic device 100 currently transmits the target data through the LAN link. When the screen projection application determines to switch the transmission link (for example, receiving the user's operation to switch the screen projection mode, detecting that the conditions for switching the transmission link are met, etc.), the screen projection application can send the next frame of data in the target data to the interface P2P-0-1, and then transmit it to the electronic device 200 through the P2P link. In this way, the transmission link can be switched during the data transmission process, and data loss can be avoided.
[0097] However, the power consumption required to maintain a P2P link is much greater than that required to maintain a LAN link. For example, in a wireless LAN, the power consumption required to maintain a STA-AP connection is approximately 10+ mAh (milliampere-hours). Under the same circumstances, the power consumption required to maintain the GO and GC in a P2P network is approximately 100+ mAh. Therefore, the power consumption required to maintain both a LAN link and a P2P link is very high.
[0098] In other embodiments, the electronic device 100 may control the dynamic establishment and dismantling of the P2P link.
[0099] For example, as shown in FIG3C , a LAN link or a P2P link can be established between the electronic device 100 and the electronic device 200. The physical interface corresponding to the above communication link can refer to the relevant content of the embodiment shown in FIG3A above, and will not be repeated here. Among them, the electronic device 100 can control the dynamic dismantling and establishment of the P2P link, that is, when data needs to be transmitted through the P2P link, the electronic device 100 establishes and maintains the P2P link between the electronic device 200; when data does not need to be transmitted through the P2P link, the electronic device 100 can disconnect the P2P link between the electronic device 200. In this way, during the data transmission process, there is no need to always maintain the P2P link, which can reduce the power consumption required during the data transmission process.
[0100] However, using the above-mentioned switching method, when the screen projection mode switches from streaming mode to mirror mode, the screen projection application is sending data through the LAN link, and it is necessary to notify to stop sending data on the LAN link and enable the P2P link to send data. Since it takes a certain amount of time to establish a P2P link (for example, 3 seconds), data jams may occur during data transmission, and the electronic device 200 at the receiving end may have a black screen or a distorted screen. Therefore, the use of dynamic dismantling and reconstruction of P2P links requires matching additional collaborative transmission mechanisms, which increases the complexity of the solution and is not very applicable.
[0101] In the shared Internet access scenario, there are similar problems to the above-mentioned screen projection scenario. For example, the electronic device 100 can share the network with the electronic device 200 through the P2P link and the Bluetooth link, and the electronic device 200 can obtain the target data required by the user of the electronic device 200 through the P2P link or the Bluetooth link. Since the user's Internet access behavior on the electronic device 200 is random, and the amount of target data required for different behaviors varies greatly, for example, when the user watches a video through the electronic device 200, the amount of target data is large, which is a high-traffic scenario; when the user chats through the electronic device 200, the amount of target data is small, which is a low-traffic scenario. In a high-traffic scenario, the electronic device 100 uses a P2P link to transmit the target data, and in a low-traffic scenario, the electronic device 100 uses a Bluetooth link to transmit the target data. If the electronic device 100 maintains both the Bluetooth link and the P2P link at the same time, the high power consumption of the P2P link will result in excessive power consumption. If the electronic device 100 adopts the method of dynamically dismantling and reconstructing the P2P link, since it is impossible to determine when the high-traffic scenario and the low-traffic scenario will switch, data freezing or loss is inevitable, which will bring a very poor user experience to the user.
[0102] It is understandable that the shared Internet access embodiment here is only an example. In the embodiment of the present application, the shared Internet access scenario may also include more links or other types of links, and the present application does not limit this.
[0103] The present application provides a link switching method, wherein the first electronic device includes a first logical interface, a first physical interface and a third physical interface. The second electronic device includes a second logical interface, a second physical interface and a fourth physical interface. The first physical interface and the second physical interface can be used to establish a first link, and the third physical interface and the fourth physical interface can be used to establish a second link. The first logical interface and the second logical interface can be used to establish a logical link. When the first link has been established, the first electronic device sets the route from the first logical interface to the second logical interface to the address of the second physical interface, and calls the first logical interface to transmit data to the second electronic device through the first link. When it is necessary to switch the transmission link, the first electronic device, after determining that the second link has been established, sets the route from the first logical interface to the second logical interface to the address of the fourth physical interface, and calls the first logical interface to transmit data to the second electronic device through the second link.
[0104] By adopting the link switching method provided by the present application, during the data transmission process, the first link and / or the second link can be dynamically dismantled and rebuilt, and there is no need to always maintain multiple links, and the power consumption is not high. Moreover, since the link switching can be achieved by changing the route from the first logical interface to the second logical interface, the method can also achieve seamless switching of the link without data jamming or loss. The link switching method provided by the present application can be applied to multiple scenarios such as screen projection scenarios, multi-device collaboration scenarios, and shared Internet access scenarios.
[0105] The following is a schematic diagram of a model of the link switching method provided in an embodiment of the present application.
[0106] FIG4A shows a schematic diagram of a communication model between an interface of an electronic device 100 and an interface of an electronic device 200 provided in an embodiment of the present application.
[0107] As shown in Figure 4A, electronic device 100 may have a logical interface conInt0, which may correspond to multiple physical interfaces of electronic device 100, including interface wlan0 and interface P2P-0-1. Electronic device 200 may have a logical interface conInt1, which may correspond to multiple physical interfaces of electronic device 200, including interface wlan1 and interface P2P-1-1. Interface wlan1 can be used to establish a local area network link, and interface P2P-1-1 can be used to establish a peer-to-peer (P2P) link. It should be noted that when electronic device 200 can establish a physical link with any physical interface corresponding to logical interface conInt0, electronic device 200 can communicate with logical interface conInt0 via that physical link. Similarly, when electronic device 100 can establish a physical link with any physical interface corresponding to logical interface conInt1, electronic device 100 can communicate with logical interface conInt1 via that physical link. In some embodiments, the logical interface conInt0 may correspond to all physical interfaces in the electronic device 100 , and / or the logical interface conInt1 may also correspond to all physical interfaces in the electronic device 200 .
[0108] The electronic device 100 and the electronic device 200 can determine the IP addresses of the logical interface conInt0 and the logical interface conInt1 through negotiation. For example, the IP address of the logical interface conInt0 can be 1.1.1.1, and the IP address of conInt1 can be 2.2.2.2. Afterwards, the electronic device 100 can establish a logical link between the logical interface conInt0 and the logical interface conInt1. The logical link can correspond to one or more physical links. The one or more physical links are physical links established between the physical interface corresponding to the logical interface conInt0 and the physical interface corresponding to the logical interface conInt1, such as a local area network link and a P2P link. It should be noted that if the logical interface conInt0 and the logical interface conInt1 also correspond to other types of physical interfaces, the physical link corresponding to the logical link can also include other types of physical links, such as a Bluetooth link, etc.
[0109] Data transmitted over a logical link is actually transmitted over one of the one or more physical links. When at least one of the one or more physical links is established, the logical link can transmit data over one of the established physical links. The route from logical interface conInt0 to logical interface conInt1 on electronic device 100 can be used to indicate the physical link from electronic device 100 to logical interface conInt1. By setting the route from logical interface conInt0 to logical interface conInt1, electronic device 100 can indicate the physical link from which target data is sent to logical interface conInt1. Specifically, when electronic device 100 sets the route from logical interface conInt0 to logical interface conInt1 to the IP address of interface wlan1 on electronic device 200, the physical link from electronic device 100 to logical interface conInt1 is a local area network link. When the route from logical interface conInt0 to logical interface conInt1 is set to the IP address of interface P2P-1-1 on electronic device 200, the physical link from electronic device 100 to logical interface conInt1 is a peer-to-peer (P2P) link. It should be noted that when a logical link corresponds to more than two physical links, the electronic device 100 can determine the link after switching based on routing priority, link weight, etc. The specific method can be referred to the following embodiment and will not be described in detail here.
[0110] For example, taking the example of a transmission link switching from a LAN link to a P2P link, before the link switching, a LAN link is established between electronic device 100 and electronic device 200 based on interface wlan0 and interface wlan1, and the route from logical interface conInt0 to logical interface conInt1 is the IP address of interface wlan1. In this case, data transmitted on the logical link can be transmitted via the LAN link, that is, electronic device 100 can call logical interface conInt0 to send data to electronic device 200 based on the LAN link. When it is detected that the link switching conditions are met (for example, receiving a link switching operation from a user, detecting that the activity of the current transmission link is reduced, detecting that the current transmission link is interfered with, etc.), electronic device 100 can establish a P2P link based on interface P2P-0-1 and interface P2P-1-1. After detecting that the P2P link is established, electronic device 100 can set the route from logical interface conInt0 to logical interface conInt1 to the IP address of interface P2P-1-1. At this time, the data transmitted on the logical link can be transmitted through the P2P link, that is, the electronic device 100 can call the logical interface conInt0 to send data to the electronic device 200 based on the P2P link.
[0111] As another example, taking the case where the transmission link switches from a P2P link to a LAN link, before the link switch, a P2P link is established between electronic device 100 and electronic device 200. The route from logical interface conInt0 to logical interface conInt1 is the IP address of interface P2P-1-1 in electronic device 200. Electronic device 100 can use logical interface conInt0 to send data to electronic device 200 based on the P2P link. When it is detected that the link switch conditions are met and that the LAN link has been established, electronic device 100 can set the route from logical interface conInt0 to logical interface conInt1 to the IP address of interface wlan1. At this point, electronic device 100 can use logical interface conInt0 to send data to electronic device 200 based on the LAN link.
[0112] In this way, when electronic device 100 transmits data to electronic device 200, the transmission link can be switched by changing the route from logical interface conInt0 to logical interface conInt1. Furthermore, there is no need to maintain the P2P link at all times, saving power. Furthermore, data jamming and other issues can be avoided, achieving seamless link switching.
[0113] FIG4B shows a schematic diagram of a communication model between a sending-end application and an interface in an electronic device 100 provided in an embodiment of the present application.
[0114] As shown in Figure 4B, the electronic device 100 may include a sending end application and a logical interface conInt0. The logical interface conInt0 may correspond to multiple physical interfaces of the electronic device 100, including the interface wlan0. After triggering the establishment of a P2P link, the multiple physical interfaces may also include the interface P2P-0-1. The relationship between the logical interface conInt0 and the interface wlan0 and the interface P2P-0-1 can refer to the relevant description in the embodiment shown in Figure 4A above.
[0115] The sending end application in the electronic device 100 is a data sending end and can establish a communication connection with the logical interface conInt0, such as socket 3.
[0116] For example, taking the example of a transmission link switching from a LAN link to a P2P link, before the link switch, the route from logical interface conInt0 to logical interface conInt1 is set to the address of interface wlan1 on electronic device 200. In this case, the specific process for electronic device 100 to call logical interface conInt0 to send target data to electronic device 200 is as follows: the sending application can send the target data and the target address to logical interface conInt0 via socket3, where the target address is the IP address of logical interface conInt1; logical interface conInt0 determines to send the target data to logical interface conInt1 based on the target address. Furthermore, based on the route from logical interface conInt0 to logical interface conInt1 (the IP address of interface wlan1), the physical link leading to logical interface conInt1 is determined to be a LAN link. If the LAN link is determined to be used to send the target data, logical interface conInt0 sends the received target data to interface wlan0 on electronic device 100, which then sends the target data to electronic device 200 via the LAN link.
[0117] When it is detected that the link switching condition is met, the electronic device 100 can trigger the establishment of a P2P link. After detecting that the P2P link is established, the electronic device 100 can set the route from the logical interface conInt0 to the logical interface conInt1 to the IP address of the interface P2P-1-1. In this case, the specific process of the electronic device 100 calling the logical interface conInt0 to send the target data to the electronic device 200 is as follows: the sending application can send the target data and the target address to the logical interface conInt0 through socket3. The target address is the IP address of the logical interface conInt1, and the target address is used to indicate the destination of the target data; the logical interface conInt0 determines to send the target data to the logical interface conInt1 based on the target address. And based on the route from the logical interface conInt0 to the logical interface conInt1 (the IP address of the interface P2P-1-1), it is determined that the physical link to the logical interface conInt1 is a P2P link. When it is determined to use the P2P link to send the target data, the logical interface conInt0 sends the received target data to the interface P2P-0-1 of the electronic device 100; the interface P2P-0-1 of the electronic device 100 sends the target data to the electronic device 200 through the P2P link.
[0118] As another example, taking the example of the transmission link switching from a P2P link to a LAN link, before the link switching, a P2P link is established between the electronic device 100 and the electronic device 200, and the route pointing to the logical interface conInt1 is set to the IP address of the interface P2P-1-1. In this case, the specific process of the electronic device 100 calling the logical interface conInt0 to send the target data to the electronic device 200 is as follows: the sending application can send the target data and the target address to the logical interface conInt0 through socket3, and the target address is the IP address of the logical interface conInt1; the logical interface conInt0 determines to send the target data to the logical interface conInt1 based on the target address, and determines that the physical link to the logical interface conInt1 is a P2P link based on the route from the logical interface conInt0 to the logical interface conInt1 (the IP address of the interface P2P-1-1). When it is determined to use the P2P link to send the target data, the logical interface conInt0 sends the received target data to the interface P2P-0-1 of the electronic device 100; the interface P2P-0-1 of the electronic device 100 sends the target data to the electronic device 200 through the P2P link.
[0119] When it is detected that the link switching conditions are met and that the LAN link has been established, the electronic device 100 can set the route from the logical interface conInt0 to the logical interface conInt1 to the IP address of the interface wlan1. In this case, the specific process for the electronic device 100 to call the logical interface conInt0 to send the target data to the electronic device 200 is as follows: the sending application can send the target data and the target address to the logical interface conInt0 via socket3, where the target address is the IP address of the logical interface conInt1; the logical interface conInt0 determines to send the target data to the logical interface conInt1 based on the target address, and determines that the physical link to the logical interface conInt1 is the LAN link based on the route from the logical interface conInt0 to the logical interface conInt1 (the IP address of the interface wlan1). If it is determined that the LAN link is used to send the target data, the logical interface conInt0 sends the received target data to the interface wlan0 of the electronic device 100, and the interface wlan0 of the electronic device 100 sends the target data to the electronic device 200 via the LAN link.
[0120] In this way, when electronic device 100 transmits data to other electronic devices, the sending application in electronic device 100 can send data to one of the physical interfaces corresponding to logical interface conInt0 through the communication connection between the sending application and the logical interface conInt0, and transmit the data to electronic device 200 through the link between the physical interface and the electronic device 200. Moreover, before and after the link switching, the target address of the target data sent by the sending application is the IP address of the logical interface conInt1. The sending application does not need to be aware of the switching of the transmission link, and does not require an additional coordinated transmission mechanism to ensure normal data transmission, thereby achieving seamless switching of the transmission link.
[0121] It can be understood that the embodiments shown in Figures 4A to 4B above are only illustrative of the link for transmitting target data by changing the route switching pointing to the logical interface in the electronic device 200. In the embodiments of the present application, the link between the electronic device 100 and the electronic device 200 may also include a Bluetooth link, or may include more links than in the above embodiments, or include links of a different type than in the above embodiments, and the present application does not limit this.
[0122] The following is a flow chart of a link switching method provided in an embodiment of the present application.
[0123] As shown in FIG5 , the specific process of the link switching method may include the following steps:
[0124] S501 , the electronic device 100 receives an operation 1 in which a user sends target data to the electronic device 200 .
[0125] Operation 1 is used to trigger the electronic device 100 to send target data to the electronic device 200. In the screen projection scenario, operation 1 can be an operation of the user projecting the screen to the electronic device 200.
[0126] S502 , in response to operation 1 , the electronic device 100 establishes a link 1 with the electronic device 200 . The link 1 is a physical link between the interface 1 of the electronic device 100 and the interface 2 of the electronic device 200 .
[0127] Step S502 is an optional operation. In some embodiments, if a physical link has already been established between the electronic device 100 and the electronic device 200 when the electronic device 100 receives operation 1, the electronic device 100 uses the physical link as link 1 and executes the following steps.
[0128] It should be noted that in the embodiments of the present application, the communication connection between electronic device 100 and electronic device 200 may include a physical link and a logical link. A physical link refers to a real link that can be used for communication, such as a local area network link, a Bluetooth link, a P2P link, etc. A logical link refers to a link established between logical interfaces that does not actually exist. A logical link may correspond to one or more physical links, and a logical link may achieve communication through one of the one or more physical links.
[0129] Physical links can include multiple types, and the types of physical links in the embodiments of the present application can also be referred to as link types. Physical links can be classified by type and include: local area network link, P2P link, Bluetooth low energy (BLE) link, etc.
[0130] The link type of link 1 is determined by the type of interface 1. The type of interface 1 is the same as that of interface 2. For example, the types of interface 1 and interface 2 can be WLAN interfaces, Bluetooth interfaces, or other types of interfaces.
[0131] The following is an exemplary introduction to the establishment of link 1.
[0132] In some embodiments, link 1 may be a Bluetooth link, such as the aforementioned BLE link. Electronic device 100 may establish a Bluetooth low energy (BLE) link, also known as a Bluetooth link, with electronic device 200. The BLE link may be established in a manner similar to existing methods.
[0133] In some embodiments, link 1 may also be a local area network link.
[0134] If a Wi-Fi connection is established between the electronic device 100 and the AP (for example, the electronic device 300), and the electronic device 200 also establishes a Wi-Fi connection with the AP, then the electronic device 100 and the electronic device 200 can establish a local area network link based on the Wi-Fi connection between the two parties and the AP after determining that both parties have established a Wi-Fi connection with the AP. Among them, the electronic device 100 and the electronic device 200 can send the device capability information of their own devices to each other in the form of broadcast, including the address of the interface in the device, the type of interface, and the established connection, etc. The specific content of the device capability information can refer to the relevant description of the following step S506. The electronic device 100 can determine that the electronic device 200 also has a Wi-Fi connection with the same AP based on the received device capability information of the electronic device 200; the electronic device 200 can determine that the electronic device 100 also has a Wi-Fi connection with the same AP based on the received device capability information of the electronic device 100.
[0135] If there is an AP near the electronic device 100 and the electronic device 200, and at least one of the electronic devices 100 and 200 has not established a Wi-Fi connection with the AP, the electronic device can first establish a Wi-Fi connection with the AP, and then the electronic device 100 and the electronic device 200 can establish a local area network link based on the Wi-Fi connection between both parties and the AP.
[0136] If there is no AP near the electronic device 100 and the electronic device 200, the electronic device 100 can first establish a Bluetooth link with the electronic device 200, negotiate to determine the AP and STA on the Bluetooth link, and then the electronic device 100 can establish a LAN link with the electronic device 200.
[0137] The process of establishing a Wi-Fi connection between the electronic device 100 (or the electronic device 200) and the AP may refer to the following process of establishing a Wi-Fi connection between a STA and an AP:
[0138] 1. The STA sends an authorization request to the AP, requesting the AP to grant the STA permission to join the WLAN network where the AP is located.
[0139] 2. The AP authorizes the STA to join the WLAN network where the AP is located.
[0140] 3. The STA sends a connection request to the AP to request the AP to establish a communication connection with the STA.
[0141] 4. The AP sends a connection response to the STA to inform the STA that the AP agrees to establish a communication connection with the STA.
[0142] 5. The STA and AP begin communicating with each other.
[0143] The communication connection between the STA and the AP is established, and the STA and the AP can communicate with each other through the communication connection.
[0144] It is understandable that the embodiments here are merely examples. In the embodiments of the present application, the electronic device 100 may also establish a local area network link with the electronic device 200 in other ways, or establish a Bluetooth link or other types of links with the electronic device 200, etc. This application does not limit this.
[0145] S503 , the electronic device 100 creates a logical interface 1 .
[0146] Logical interface 1 may correspond to multiple physical interfaces in electronic device 100, including interface 1. In some embodiments, logical interface 1 may correspond to all physical interfaces in electronic device 100. Optionally, in this case, electronic device 100 may also create logical interface 1 before link 1 is established.
[0147] S504 , the electronic device 200 creates a logical interface 2 .
[0148] Logical interface 2 may correspond to multiple physical interfaces of electronic device 200, including interface 2. In some embodiments, logical interface 2 may correspond to all physical interfaces of electronic device 200. Optionally, in this case, electronic device 200 may also create logical interface 2 before link 1 is established.
[0149] S505 , the electronic device 100 and the electronic device 200 determine the address of the logical interface 1 and the address of the logical interface 2 through negotiation via the link 1 .
[0150] After link 1 is established, electronic device 100 and electronic device 200 may determine the address of logical interface 1 and the address of logical interface 2 through negotiation on link 1. The addresses of the logical interfaces may be IP addresses.
[0151] After determining the address of logical interface 1 and the address of logical interface 2 , electronic device 100 can obtain the address of logical interface 2 , and electronic device 200 can obtain the address of logical interface 1 .
[0152] S506 , the electronic device 100 sends a message 1 to the electronic device 200 , including device capability information of the electronic device 100 .
[0153] Electronic device 100 may send message 1 to electronic device 200 via link 1 .
[0154] Message 1 may carry device capability information of the electronic device 100. The device capability information may include a device identifier, device interface information (e.g., the number of physical interfaces in the device, the type and address of each physical interface, etc.), and optionally, any one or more of the following: the Bluetooth capability of the device, the power of the device, the energy that can be stored in the device, etc. In some embodiments, message 1 may also include a correspondence between the logical interface 1 and multiple physical interfaces in the electronic device 100, indicating the multiple physical interfaces corresponding to the logical interface 1.
[0155] The type of physical interface can be used to indicate the type of link that can be established with the physical interface. For example, a WLAN-type physical interface can be used to establish a local area network link, a Bluetooth-type physical interface can be used to establish a Bluetooth link, and so on. It should be noted that since P2P interfaces are generally temporarily configured, message 1 generally does not include interface information for P2P-type physical interfaces.
[0156] It should be noted that, in some embodiments, steps S506 to S507 may be performed before link 1 is established. For example, during the discovery phase of electronic device 100 and electronic device 200, the device capability information of the local device is sent to nearby electronic devices via broadcast. In some embodiments, steps S506 to S507 may also be performed after link 1 is established, i.e., the device capability information of the local device is sent to the peer device via link 1.
[0157] S507 , the electronic device 200 sends a message 2 to the electronic device 100 , including device capability information of the electronic device 200 .
[0158] The electronic device 200 may send the message 2 to the electronic device 100 via the link 1. For the device capability information of the electronic device 200, reference may be made to the relevant description of the device capability information of the electronic device 100 in the above step S506.
[0159] The device capability information of electronic device 100 and the device capability information of electronic device 200 obtained in step S506 and step S507 can be used to determine one or more physical links that can be established between electronic device 100 and electronic device 200, and the addresses of the physical interfaces at both ends of the one or more physical links.
[0160] S508 : The electronic device 100 and the electronic device 200 establish a logical link between the logical interface 1 and the logical interface 2 .
[0161] After determining the addresses of logical interface 1 and logical interface 2 through negotiation, electronic device 100 and electronic device 200 may establish a communication connection between logical interface 1 and logical interface 2. That is, step S508 may be performed after step S505.
[0162] It should be noted that the communication connection between logical interface 1 and logical interface 2 is a logical link, and the logical link may correspond to one or more physical links. When data is transmitted through the logical link, the physical link corresponding to the logical link actually transmits the data. The physical link corresponding to the logical link depends on the physical interface corresponding to logical interface 1 and the physical interface corresponding to logical interface 2. In some embodiments, logical interface 1 corresponds to all physical interfaces in electronic device 100, and logical interface 2 corresponds to all physical interfaces in electronic device 200. In this case, the physical links corresponding to the logical link include all physical links that can be established between electronic device 100 and electronic device 200.
[0163] The one or more physical links corresponding to the logical link may include link 1.
[0164] Since the logical link is a link from logical interface 1 to logical interface 2, the route from logical interface 1 to logical interface 2 can be used to indicate the physical link from electronic device 100 to logical interface 2. Therefore, electronic device 100 can set a route from logical interface 1 to logical interface 2 to indicate the physical link from electronic device 100 to logical interface 2 for transmitting target data. For the specific correspondence, please refer to the following steps.
[0165] S509 , the electronic device 100 sets the route from logical interface 1 to logical interface 2 as the address of interface 2 .
[0166] The address of interface 2 may be the IP address of interface 2. The address of interface 2 may be acquired in the above step S507, that is, the device capability information of the electronic device 200 may include the address of interface 2.
[0167] In some embodiments, the electronic device 100 can use a static routing setting method to set the route from logical interface 1 to logical interface 2 to the address of interface 2. Exemplarily, the electronic device 100 can use the "route" instruction to set the route from logical interface 1 to logical interface 2 based on the syntax "ip route target network segment address subnet mask next hop address". Among them, the next hop address is used to indicate the address of the next electronic device, and the target network segment address, also known as the destination address, is used to identify the destination address or destination network of the target data. The subnet mask (subnet mask), also known as the network mask, address mask, or subnet mask, together with the destination address, identifies the address of the network segment where the destination host or router is located. Since the electronic device 100 wants to send target data to the logical interface 2 of the electronic device 200, the next hop is the logical interface 2 of the electronic device 200. By setting the next hop address to the address of interface 2, the route from logical interface 1 to logical interface 2 can be set to the address of interface 2.
[0168] It can be understood that the above embodiment is only an illustrative example of a method for setting a route from logical interface 1 to logical interface 2. In an embodiment of the present application, a method different from the above embodiment can also be used to set a route from logical interface 1 to logical interface 2, and this application does not limit this.
[0169] S510 , the electronic device 100 calls the logical interface 1 to send target data to the electronic device 200 through the link 1 .
[0170] The sending application in the electronic device 100 can set the address of the logical interface 2 as the target address. The sending application can send the target address and target data to the logical interface 1, and send the target data to the logical interface 2 through the logical interface 1.
[0171] In the case where the route from logical interface 1 to logical interface 2 is set to the address of interface 2, after receiving the target data and the target address, logical interface 1 can determine to send the data to logical interface 2 based on the target address. Logical interface 1 can determine that the outbound interface of the target data is interface 1 based on the route from logical interface 1 to logical interface 2, send the target data to interface 1, and send the target data to interface 2 via link 1 between interface 1 and interface 2, thereby achieving the purpose of sending the target data from logical interface 1 to logical interface 2. The outbound interface refers to the physical interface of electronic device 100 to send the target data to logical interface 2.
[0172] The following describes a method for determining an outgoing interface (a physical interface through which electronic device 100 sends target data to electronic device 200) based on a route from logical interface 1 to logical interface 2.
[0173] In some embodiments, the electronic device 100 may store a routing table pointing from logical interface 1 to logical interface 2 , and the electronic device 100 may determine the outgoing interface based on the routing table and the route pointing from logical interface 1 to logical interface 2 .
[0174] Illustratively, Table 1 shows the content composition of a routing table.
[0175] Table 1
[0176] As shown in Table 1, the routing table may include a destination address, a next-hop route, and an outgoing interface. Among them, the destination address is the destination address of the target data sent by the sending application in the electronic device 100. The next-hop route is used to indicate the route of the next hop. The outgoing interface is used to indicate the physical interface in the electronic device 100 used to send data to the next hop. In an embodiment of the present application, the destination address of the target data sent by the sending application is the address of logical interface 2; the next hop is the logical interface 2 of the electronic device 200, and the next-hop route is the route from logical interface 1 to logical interface 2; the outgoing interface may include multiple physical interfaces corresponding to logical interface 1. According to Table 1, when the destination address is the address of logical interface 2 and the next-hop route is the address of interface 2, the outgoing interface used to send the target data is interface 1; when the destination address is the address of logical interface 2 and the next-hop route is the address of interface 4, the outgoing interface used to send the target data is interface 3.
[0177] It can be understood that Table 1 is only an example. In the embodiment of the present application, the routing table stored in the electronic device 100 may also include the addresses of more or fewer interfaces, or include a correspondence different from the embodiment shown in Table 1, and may also include other contents such as protocols, subnet masks, priorities, etc., which are not limited in the present application.
[0178] Therefore, after the route from logical interface 1 to logical interface 2 is set to the address of interface 2, electronic device 100 can call logical interface 1 and send target data to electronic device 200 through link 1.
[0179] S511 , the electronic device 100 detects that a link switching condition is met, and determines to switch the transmission link to link 2 , where link 2 is a physical link between the interface 3 of the electronic device 100 and the interface 4 of the electronic device 200 .
[0180] The link switching conditions may include any one or more of the following: receiving a user operation to switch the transmission link (for example, switching the screen projection mode in the screen projection scenario), the current transmission link (for example, link 1) being interfered with, the transmission rate of the current transmission link being lower than a preset rate, the power consumption of the current transmission link being higher than a preset power consumption value, the transmission quality of the current transmission link being lower than a preset quality, etc. The transmission quality of the link may be determined based on the transmission speed and error (for example, bit error rate, etc.) of the link.
[0181] In some embodiments, the link switching condition may further include: the bandwidth of the current transmission link does not match the data volume of the target data. For example, if the data volume of the target data is greater than a preset value, and the bandwidth of the current transmission link (e.g., link 1) is less than the preset bandwidth, the transmission link is switched to a link with a larger bandwidth (e.g., link 2). For another example, if the data volume of the target data is less than a preset value, and the bandwidth of the current transmission link is much greater than the preset bandwidth, the electronic device 100 may switch the transmission link to a link with a slightly smaller bandwidth to avoid wasting resources.
[0182] After detecting that the link switching condition is met, the electronic device 100 may determine to switch the transmission link to link 2. Link 2 is different from link 1.
[0183] In some embodiments, if the physical links corresponding to the logical link only include link 1 and link 2 (for example, only two physical links can be established between the electronic device 100 and the electronic device 200), then after detecting that the link switching condition is met, the electronic device 100 can determine that the transmission link after switching is link 2. If the physical links corresponding to the logical link include more than two physical links, the link switching condition can also include the routing priorities of different physical links or the weights of different physical links. The routing priority or weight can be used to determine the link with the highest priority / highest weight among multiple physical links (excluding the current transmission link) as the transmission link after switching. Among them, the routing priority of the link or the weight of the link can be determined based on a preset priority or weight, or can be calculated based on the weights of different physical links in different scenarios. The specific method can refer to the relevant description in the following embodiments and will not be described in detail here.
[0184] S512: The electronic device 100 determines whether link 2 has been established.
[0185] After determining to switch the transmission link to link 2, the electronic device 100 can determine whether link 2 has been established. For example, the electronic device 100 can send a detection request to the interface 4 through the interface 3, and determine whether a detection response is received from the electronic device 200 to determine whether link 2 is established. If the electronic device 100 receives the detection response sent by the electronic device 200, the electronic device 100 can determine that link 2 is established; if the electronic device 100 cannot receive the detection response sent by the electronic device 200, the electronic device 100 determines that link 2 has not been established.
[0186] When it is determined that link 2 has been established, the electronic device 100 may execute the following step S514 and subsequent steps.
[0187] When it is determined that link 2 has not been established, the electronic device 100 may execute the following step S513 and subsequent steps.
[0188] S513 , the electronic device 100 and the electronic device 200 establish link 2 .
[0189] The link type of link 2 is different from the link type of link 1.
[0190] In some embodiments, link 2 may be a P2P link. The following is an exemplary description of a method for establishing a P2P link provided in an embodiment of the present application. The process for establishing a P2P link may include the following steps:
[0191] 1. The electronic device 100 establishes a BLE connection with the electronic device 200.
[0192] This step is optional. In some embodiments, the electronic device 100 and the electronic device 200 may also transmit the connection information of the GC and the GO via the link 1 .
[0193] 2. The electronic device 100 receives the GC connection information sent by the electronic device 200, including the media access control address, status, channel and other information of the electronic device 200.
[0194] The media access control address (MAC) is also called a physical address.
[0195] 3. The electronic device 100 sends GO connection information to the electronic device 200, including information such as the MAC address, status, and channel of the electronic device 100.
[0196] 4. The electronic device 100 creates a P2P network.
[0197] 5. The electronic device 100 and the electronic device 200 perform a four-step handshake.
[0198] The four-step handshake can be used to create keys to encrypt data transmitted on the P2P link.
[0199] 6. The electronic device 100 establishes a P2P link with the electronic device 200.
[0200] It is understood that this is only an exemplary method for establishing a P2P link. In the embodiment of the present application, the P2P link can also be established in other ways, which are not limited in this application. After the P2P link is established, the electronic device 100 can obtain the address of the P2P interface in the electronic device 200.
[0201] In some embodiments, link 2 may also be other types of links, such as a Bluetooth link, a local area network link, etc. In this case, the method for establishing link 2 may refer to the method for establishing link 1 mentioned above, or may refer to the method for establishing other types of links. This application does not limit this.
[0202] S514 , the electronic device 100 sets the route from logical interface 1 to logical interface 2 to the address of interface 4 .
[0203] After determining that link 2 is established and determining that the switched transmission link is link 2, the electronic device 100 can set the route from logical interface 1 to logical interface 2 to the address of interface 4. The address of interface 4 can be the IP address of interface 4. The address of interface 4 can also be obtained in the above step S507, that is, the device capability information of the electronic device 200 can include the address of interface 4. In other embodiments, if interface 4 is a P2P interface, interface 4 is configured when the P2P link is triggered to be established, and the address of interface 4 can be obtained through the P2P link after the P2P link is established. The way in which the electronic device 100 sets the route from logical interface 1 to logical interface 2 can refer to the relevant description in the above step S509.
[0204] S515 , the electronic device 100 calls the logical interface 1 to send the target data to the electronic device 200 through the link 2 .
[0205] In the case where the route from logical interface 1 to logical interface 2 is set to the address of interface 4, the electronic device 100 can determine that the physical link corresponding to the logical link between logical interface 1 and logical interface 2 is link 2 between interface 3 and interface 4. At this time, the sending-end application in the electronic device 100 can set the address of logical interface 2 as the target address, and send the target data to logical interface 2 through logical interface 1. After receiving the target data and the target address, logical interface 1 can determine to send it to logical interface 2 based on the target address, and determine the transmission link to be link 2 based on the route from logical interface 1 to logical interface 2. That is, logical interface 1 can send the target data to interface 3, and send the target data to interface 2 through link 2 between interface 3 and interface 4, so as to achieve the purpose of sending the target data to logical interface 2 through logical interface 1.
[0206] The method of determining the outgoing interface based on the route from logical interface 1 to logical interface 2 can refer to the relevant description in the above step S510, which will not be repeated here.
[0207] S516 , the electronic device 100 disconnects the link 1 with the electronic device 200 .
[0208] Step S516 is an optional step.
[0209] After electronic device 100 switches the transmission link to link 2, electronic device 100 may disconnect link 1. In some embodiments, electronic device 100 may also disconnect link 1 when it detects that a disconnection condition is met. Disconnection conditions may include any one or more of the following: electronic device 100 does not detect data transmission via link 1 within a preset time period, power consumption of link 1 is maintained greater than a preset power consumption, link 1 is of a preset link type, etc.
[0210] It should be noted that, when the transmission link is link 2, the electronic device 100 may also switch the transmission link to link 1 or another link by changing the route from logical interface 1 to logical interface 2 when detecting that the link switching condition is met. This is not limited in this application. The specific switching method can be referred to the relevant steps above and will not be repeated here.
[0211] By adopting the link switching method provided in the embodiment of the present application, the transmission link can be switched by changing the route of the logical interface 1 of the electronic device 100 to point to the logical interface 2. The route switching occurs at the IP layer, and the transport layer and above (including the sending application) will not perceive the link switching, which will not affect the application's sending of target data. It can also achieve seamless switching of the link to avoid data jamming and data loss.
[0212] In some embodiments, two or more physical links may be established between the electronic device 100 and the electronic device 200. In this case, in step S511 above, after detecting that the link switching condition is met, the electronic device 100 may determine the transmission link after the switch from the multiple physical links. The electronic device 100 may store weights for different types of links and determine the transmission link as link 2 based on the preset weights. For example, if the weight of the local area network link stored in the electronic device 100 is higher than the weight of the P2P link, the electronic device 100 may determine the local area network link as the transmission link. In some embodiments, the weights of different links may also be different in different situations. For example, in a high-traffic transmission scenario, the weight of the local area network link may be higher than the Bluetooth link, while in a low-power transmission scenario, the P2P link may have the lowest weight. Based on the weights of different links in the current situation and the current situation, the electronic device 100 may determine the link with the highest weight as the transmission link.
[0213] Table 2 shows the weights of different types of links when the amount of target data is different.
[0214] Table 2
[0215] As shown in Table 2, the transmission links between electronic device 100 and electronic device 200 include a local area network link, a P2P link, and a Bluetooth link. When the amount of target data is greater than a preset value, the weight of the local area network link is 7, the weight of the P2P link is 8, and the weight of the Bluetooth link is 2; when the amount of target data is less than a preset value, the weight of the local area network link is 5, the weight of the P2P link is 3, and the weight of the Bluetooth link is 9. Considering only the amount of target data, if the current transmission link is a Bluetooth link and it is detected that the link switching condition is met, when the amount of target data is greater than the preset value, the electronic device 100 can determine that the P2P link with a higher weight is the transmission link after switching.
[0216] It is understandable that Table 2 is only an example. In an embodiment of the present application, when the amount of target data is greater than or less than a preset value, the weights corresponding to different links may also be weights different from those in the above embodiment. In addition, the electronic device 100 may also store more link types and situations than those in Table 2 (for example, high-power transmission, low-power transmission, high-efficiency transmission, etc.), as well as weights and weights of different types of links under different circumstances. At this time, the electronic device 100 may calculate the weighted sum of different links and determine the link with the highest weighted sum as the transmission link after switching. This application does not limit this.
[0217] In other embodiments, the logical link between logical interface 1 and logical interface 2 may also correspond to more links, or correspond to links of a different type than those described in the above embodiments. The link may also be determined by the electronic device 100 based on the weights of different types of links. The specific method can refer to the above embodiments.
[0218] The link switching method provided in the embodiment of the present application can be applied to screen projection scenarios.
[0219] In the process of projecting the screen from the electronic device 100 to the electronic device 200, the electronic device 100 can switch the transmission link of the target data (the projection data in this scenario) based on the switching of the projection mode. According to the embodiments shown in Figures 3A to 3C above, the projection mode can include a mirror mode and a stream mode. In the mirror mode, the electronic device 100 can determine that the link for transmitting the target data is a P2P link, and in the stream mode, it can determine that the link for transmitting the target data is a LAN link. Using the method shown in Figure 5 above, the electronic device 100 can switch to the corresponding link according to the change of the projection mode.
[0220] For example, when a logical link exists between the logical interface 1 of the electronic device 100 and the logical interface 2 of the electronic device 200, and the electronic device 100 is in streaming mode, and the route from the logical interface 1 to the logical interface 2 is set to the address of the WLAN type interface in the electronic device 200, the electronic device 100 uses the local area network link to transmit the target data to the electronic device 200. When detecting that the screen projection mode has switched to the mirroring mode, the electronic device 100 can trigger the establishment of a P2P link with the electronic device 200. After the P2P link is established, the electronic device 100 can obtain the address of the P2P type interface in the electronic device 200 and set the route from the logical interface 1 to the logical interface 2 to the address of the P2P type interface. In this way, the electronic device 200 can transmit the target data to the electronic device 200 via the P2P link. Similarly, when the electronic device 100 detects that the screen projection mode has switched to the streaming mode again, the electronic device 100 can set the route from the logical interface 1 to the logical interface 2 to the address of the WLAN type interface in the electronic device 200 and transmit the target data via the local area network link. In addition, when the electronic device 100 does not use the P2P link to transmit target data, the electronic device 100 may disconnect the P2P link with the electronic device 200 to reduce power consumption.
[0221] It is understandable that this is just an example of how the method shown in Figure 5 can be applied to screen projection scenarios. In some screen projection scenarios, the link switching condition may also include other conditions. For details, please refer to the link switching conditions shown in Figure 5, which will not be repeated here.
[0222] The link switching method provided in the embodiment of the present application can also be applied to multi-device collaboration scenarios.
[0223] In a multi-device collaboration scenario, multiple transmission links, such as a local area network link and a P2P link, may also be established between the electronic device 100 and the electronic device 200 .
[0224] In the above-mentioned multi-device collaboration scenario, the electronic device 100 can project its screen to the electronic device 200, and during the projection process, the electronic device 100 can also send files to the electronic device 200. For example, when the electronic device 100 projects its screen to the electronic device 200 in mirroring mode, the electronic device 100 can send data to the electronic device 200 via a P2P link. At this time, if the electronic device 100 receives an operation from the user to send a file to the electronic device 200, the electronic device 100 can switch the transmission link from the P2P link to the LAN link. The link switching method can refer to the relevant description in the above embodiment.
[0225] It can be understood that the above embodiment is only an example. The link switching method provided in the embodiment of the present application can also be applied to other multi-device collaboration scenarios, and the transmission link can also include other wireless communication links such as Bluetooth links. This application does not limit this.
[0226] The link switching method provided in the embodiment of the present application can also be applied to service synchronization scenarios between distributed devices.
[0227] In the distributed device service synchronization scenario, multiple links, such as a P2P link and a Bluetooth link, can be established between the electronic device 100 and the electronic device 200. The electronic device 100 can synchronize services with the electronic device 200 through these multiple links, for example, sending an installation package to the electronic device 200, performing user configuration on the electronic device 200 through the electronic device 100, and so on.
[0228] During the process of electronic device 100 transmitting target data to electronic device 200, there is a logical link between logical interface 1 of electronic device 100 and logical interface 2 of electronic device 200. Electronic device 100 can implement link switching by changing the route from logical interface 1 to logical interface 2. For specific steps, please refer to the relevant content in the embodiment shown in Figure 5 above. Electronic device 100 can detect the link switching condition to determine whether to switch the transmission link of the target data (or determine which link to switch to). The link switching condition can refer to the embodiment shown in Figure 5 above.
[0229] For example, taking the link switching condition including the data volume of the target data as an example, the electronic device 100 can determine that the transmission link is a P2P link when it detects that the data volume of the target data is greater than a preset value; when it detects that the data volume of the target data is less than a preset value, it can determine that the transmission link is a Bluetooth link, and so on.
[0230] It is understandable that the embodiment herein is merely an example. In the embodiment of the present application, the link switching condition may further include more or other factors, and the link switching condition may be different in different scenarios. For example, in a low-power scenario, the electronic device 100 may tend to switch the link to a link with lower power consumption, and so on.
[0231] The link switching method provided in the embodiment of the present application can also be applied to shared Internet access scenarios.
[0232] Internet access sharing can be achieved through various methods, including gateway-based sharing, proxy-based sharing, and routing-based sharing. Gateway-based sharing uses a device (such as a computer or other network device) that is directly connected to an Internet access device (such as a modem, ISDN, or ADSL modem) as the gateway for the entire network. Other devices on the network must pass through the gateway to connect to the Internet.
[0233] Sharing Internet access through a proxy server means that the device directly connected to the Internet (such as a computer) is used as a proxy server. Other devices that need to share the Internet access go through this proxy server. That is, all Internet access requests sent by other devices in the network must be "transmitted" through the proxy server, which is equivalent to the proxy server itself accessing the Internet.
[0234] Routing and sharing Internet access refers to providing shared Internet access to multiple user devices through network equipment and routing functions. This routing device is usually a broadband router with dial-up capabilities, but it can also be other Internet devices with dial-up capabilities. The characteristic and advantage of routing and sharing Internet access is that each user device can access the Internet freely without the need for a separate "host". User devices can dial directly into the Internet through the Internet device or router (or a dedicated line).
[0235] In a shared Internet access scenario, multiple different types of links can be established between the electronic device 100 and the electronic device 200, such as a LAN link, a P2P link, a Bluetooth link, etc., which are not limited in this application. The electronic device 100 can provide Internet access services for the electronic device 200 (and other electronic devices). In a gateway-type shared Internet access mode, the electronic device 100 can be regarded as a gateway; in a proxy server shared Internet access mode, the electronic device 100 can be regarded as a proxy server; in a routing shared Internet access mode, the electronic device 100 can be a network device that provides shared Internet access services for the electronic device 200 (or other electronic devices).
[0236] When the electronic device 100 provides a shared Internet access service for the electronic device 200, the electronic device 100 can receive and respond to an Internet access request sent by the electronic device 200, obtain target data from the server, and send the target data to the electronic device 200. During the process of the electronic device 100 transmitting the target data to the electronic device 200, the electronic device 100 can determine whether to switch the link based on whether a link switching condition is met. The link switching condition can refer to the link switching condition in the embodiment shown in FIG. 5 above.
[0237] Exemplarily, taking the determination of whether to switch the transmission link based on the data volume of the target data as an example, if the transmission link between the electronic device 100 and the electronic device 200 includes a P2P link and a Bluetooth link, and the current transmission link is a Bluetooth link, then the electronic device 100 can determine to switch the transmission link from the Bluetooth link to the P2P link when it detects that the data volume of the target data is greater than the preset value. Afterwards, if the electronic device 100 detects that the data volume of the target data is less than the preset value, the electronic device 100 can again switch the transmission link from the P2P link to the Bluetooth link and disconnect the P2P link. The link switching can be achieved by changing the route of the logical interface in the electronic device 100 to point to the logical interface in the electronic device 200. The specific link switching method can refer to the relevant steps in the embodiment shown in Figure 5 above, which will not be repeated here.
[0238] By adopting the link switching method provided in the embodiment of the present application, in a shared Internet access scenario, the electronic device 100 can also determine to adopt different transmission links based on the size of the target data requested by the electronic device 200 (i.e., high-traffic scenario and low-traffic scenario), which can not only provide a better experience for users, but also save power consumption.
[0239] It can be understood that the above embodiments are merely illustrative examples of how the link switching method provided in this application can be applied to screen projection scenarios, multi-device collaboration scenarios, and shared Internet access scenarios. The link switching methods provided in other embodiments of this application can also be applied to other multi-link transmission scenarios, and this application does not limit this.
[0240] FIG6 shows a schematic diagram of the hardware structure of the electronic device 100 .
[0241] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device. The embodiments of the present application do not impose any particular restrictions on the specific type of the electronic device.
[0242] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, 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, a sensor module 180, a display screen 194, etc. Among them, the sensor module 180 may include a touch sensor 180K. In some embodiments, the sensor module 180 may also include any one or more of the following: a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc.
[0243] In some embodiments, the electronic device 100 may further include any one or more of the following: a universal serial bus (USB) interface, an audio module, a button, a motor, an indicator, a camera, etc.
[0244] It should be understood that the structure illustrated in the embodiments of the present invention 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0245] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor), a modem processor, a graphics processing unit (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). The different processing units may be independent devices or integrated into one or more processors.
[0246] 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.
[0247] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0248] In some embodiments, the processor 110 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.
[0249] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via a USB port. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device through the power management module 141.
[0250] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 and provides power to the processor 110, the internal memory 121, the display 194, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0251] 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.
[0252] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 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.
[0253] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 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 150 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 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0254] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs the sound signal through the audio device in the audio module (including but not limited to speakers, receivers, etc.), or displays images or videos through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0255] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0256] 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 a network and other devices through 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. 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).
[0257] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0258] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be made of an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.
[0259] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
[0260] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.
[0261] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.
[0262] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
[0263] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.
[0264] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0265] In some embodiments, the electronic device 100 may further include buttons, which may include a power button, a volume button, etc. The buttons may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0266] FIG7 shows a software architecture of an electronic device 100 provided in an embodiment of the present application.
[0267] As shown in FIG7 , the electronic device 100 comprises, from top to bottom, an application layer, a system communication encapsulation layer (also called a soft bus), a framework layer, a hardware abstraction layer (HAL), and a kernel layer.
[0268] The application layer can include a series of application packages, which can include sender applications. The sender application can be a self-developed application or a third-party application. In the screen projection scenario, the sender application can be a screen projection application. In addition, in the screen projection scenario, the application layer can also include a screen projection protocol. The screen projection protocol can include one or more of the screen projection protocols in mirror mode such as miracast, cast+, and airplay. The screen projection protocol can also include one or more of the screen projection protocols in streaming mode such as DLNA and airplay.
[0269] The soft bus may include a communication protocol. The communication protocol may include a communication protocol such as TCP / UDP. The soft bus may provide an interface to the sending application, enabling the sending application to communicate with other layers. The soft bus may also establish a communication connection with a peer device (e.g., electronic device 200).
[0270] The framework layer may include a system server, which may provide an interface to the sending application and configure information such as the address and routing of the logical interface. In some embodiments, the framework layer may also include one or more other modules, such as a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, etc.
[0271] The hardware abstraction layer may include a network daemon (netdaemon, Netd), which may set addresses and routes for logical interfaces.
[0272] The kernel layer may include links (routes), which may be used to indicate the routing of transmission links.
[0273] In some embodiments, the kernel layer may further include any one or more of the following: security, drive, tools, etc. The drive may include any one or more of the following: display driver, camera driver, audio driver, sensor driver, etc.
[0274] The following describes the functions of each module in the software architecture shown in FIG8 in conjunction with the link switching method provided in an embodiment of the present application.
[0275] When a link 1 is established between the interface 1 of the electronic device 100 and the interface 2 of the electronic device 200, and the sending application in the electronic device 100 determines to send the target data to the electronic device 200 through the link 1, the sending application can send a setting instruction to the system service through the soft bus. The setting instruction can be used to indicate the configuration of the logical interface 1, and the logical interface 1 corresponds to multiple physical interfaces (including interface 1 and interface 3) in the electronic device 100. After receiving the setting instruction, the system service can set the route from the logical interface 1 to the logical interface 2 in the route to the address of the interface 2 through Netd. After setting the route from the logical interface 1 to the logical interface 2, the sending application can send the target data to the interface 1 through the connection between the logical interface 1 (such as a socket), and send it to the electronic device 200 through the link 1.
[0276] When the sending application receives an operation to switch the link from the user (or detects that other link switching conditions are met), the sending application can send a switching instruction to the system service through the soft bus, instructing the transmission link to switch from link 1 to link 2, where link 2 is the communication connection between interface 3 of electronic device 100 and interface 4 of electronic device 200. After receiving the switching instruction, the system service can set the route from logical interface 1 to logical interface 2 in route to the address of interface 4 through Netd. After setting the route from logical interface 1 to logical interface 2, the sending application can send the target data to interface 3 through the connection with logical interface 1, and send it to electronic device 200 through link 2.
[0277] It should be noted that when electronic device 100 transmits target data to electronic device 200 via link 2, electronic device 100 may also receive and respond to the user's link switching operation, switching the transmission link to link 1 or another link. During the switching process, the operations performed by each module can refer to the operations of each module during the switching from link 1 to link 2 described above. The difference lies in the different routing from logical interface 1 to logical interface 2, which will not be repeated here.
[0278] It is understandable that the embodiment shown in FIG7 is only an example. In the embodiment of the present application, the software architecture of the electronic device 100 may also include more or fewer modules than the embodiment shown in FIG7 , and the present application does not limit this.
[0279] In the embodiment of the present application, the hardware structure of the electronic device 200 and the electronic device 300 may also refer to the hardware structure of the electronic device 100 shown in Figure 6. The software architecture of the electronic device 200 may also refer to the software architecture of the electronic device 100 shown in Figure 7.
[0280] FIG8 shows a schematic flow chart of a link switching method performed by a first electronic device according to an embodiment of the present application.
[0281] As shown in FIG8 , the specific process of the first electronic device executing the link switching method may include the following steps:
[0282] S801, the first electronic device calls the first logical interface to send data to the second electronic device through the first link, the first link is a physical link between the first physical interface of the first electronic device and the second physical interface of the second electronic device, a logical link is established between the first logical interface of the first electronic device and the second logical interface of the second electronic device, and the route from the first logical interface to the second logical interface is set to the address of the second physical interface.
[0283] The first electronic device may include a first logical interface, a first physical interface, and a third physical interface. The second electronic device may include a second logical interface, a second physical interface, and a fourth physical interface.
[0284] Before the route from the first logical interface to the second logical interface is set to the address of the second physical interface, the first electronic device establishes a first link between the first physical interface and the second physical interface of the second electronic device. Furthermore, a logical link is established between the first logical interface and the second logical interface of the first electronic device and the second electronic device.
[0285] The address of the second physical interface can be obtained through the first link. In other embodiments, the address of the second physical interface can also be obtained based on the device capability information of the second electronic device broadcasted by the second electronic device and received by the first electronic device.
[0286] The first electronic device may be the electronic device 100 in the above embodiment, and the second electronic device may be the electronic device 200 in the above embodiment. The first logical interface may be the logical interface 1 in the above embodiment, or the logical interface conInt0 in the above embodiment. The second logical interface may be the logical interface 2 in the above embodiment, or the logical interface conInt1 in the above embodiment. The first physical interface may be the interface 1 in the above embodiment, the second physical interface may be the interface 2 in the above embodiment, the third physical interface may be the interface 3 in the above embodiment, and the fourth physical interface may be the interface 4 in the above embodiment. The first link may be the link 1 in the above embodiment.
[0287] S802: The first electronic device detects that a first condition is met, and establishes a second link between the third physical interface of the first electronic device and the fourth physical interface of the second electronic device.
[0288] Step S802 is an optional step. The second link is a physical link between the third physical interface and the fourth physical interface. The second link may be link 2 in the above embodiment.
[0289] When the first condition is detected, the first electronic device determines to switch the data transmission link to the second link. At this time, the first electronic device can detect whether the second link is established. If the second link is established, step S803 and subsequent steps are executed; if the second link is not established, step S802 is executed to establish the second link.
[0290] S803: The first electronic device detects that the first condition is met, and sets the route from the first logical interface to the second logical interface to the address of the fourth physical interface.
[0291] When it is detected that the first condition is met, the first electronic device determines to switch the transmission link to the second link.
[0292] The first condition may include: receiving an operation to switch the link by a user; and / or the first link is interfered with; and / or when the bandwidth of the first link is less than the bandwidth of the second link, the amount of data is greater than a preset value; and / or the transmission rate of the first link is less than a preset rate; and / or the transmission quality of the first link is lower than a preset quality.
[0293] In some embodiments, the first condition may also be the link switching condition in the above embodiment.
[0294] The address of the fourth physical interface can be obtained through the first link or the second link. In other embodiments, the address of the fourth physical interface can also be obtained based on the device capability information of the second electronic device broadcast by the second electronic device and received by the first electronic device. It should be noted that if the second link is a P2P link, the address of the fourth physical interface is generally obtained through the second link after the second link is established.
[0295] S804: The first electronic device calls the first logical interface to send data to the second electronic device through the second link.
[0296] After changing the route from the first logical interface to the second logical interface, the first electronic device can call the first logical interface to send data to the second electronic device through the second link.
[0297] S805: The first electronic device disconnects the first link with the second electronic device.
[0298] Step S805 is an optional step.
[0299] After switching the transmission link to the second link, the first electronic device may disconnect the first link.
[0300] In some embodiments, if a second condition is detected, the first electronic device may set the route from the first logical interface to the second logical interface to the address of the second physical interface. The second condition may include: receiving a user operation to switch links; and / or the second link experiencing interference; and / or when the bandwidth of the second link is less than the bandwidth of the first link, the data volume is greater than a preset value; and / or the transmission rate of the second link is less than a preset rate; and / or the transmission quality of the second link is less than a preset quality. In some embodiments, the second condition may also be the link switching condition described in the above embodiments.
[0301] In some embodiments, the first electronic device may further include a fifth physical interface, and the second electronic device may further include a sixth physical interface, and a third link may be established between the fifth and sixth physical interfaces. If the first electronic device detects that the third condition is met, it may set a route from the first logical interface to the second logical interface to the address of the sixth physical interface in the second electronic device.
[0302] If the current transmission link is the first link, the third condition may include: receiving a user link switching operation; and / or the first link is interfered with; and / or when the bandwidth of the first link is less than the bandwidth of the third link, the data volume is greater than a preset value; and / or the transmission rate of the first link is less than the preset rate; and / or the transmission quality of the first link is lower than the preset quality; and / or the third link has the highest priority or weight. Among them, the priority of the link can be preset, and the priority of different types of links in different scenarios can be different. The method for calculating the link weight can refer to the relevant content in the above embodiment.
[0303] If the current transmission link is the second link, the third condition may include: receiving a user link switching operation; and / or the second link experiencing interference; and / or when the bandwidth of the second link is less than the bandwidth of the third link, the data volume is greater than a preset value; and / or the transmission rate of the second link is less than a preset rate; and / or the transmission quality of the second link is lower than a preset quality; and / or the third link has the highest priority or weight. In some embodiments, the third condition may also be the link switching condition in the above embodiment.
[0304] The address of the sixth physical interface may be acquired through the first link, the second link, or the third link, or may be acquired by receiving device capability information of the second electronic device broadcast by the second electronic device.
[0305] It should be noted that, in the screen projection scenario, the first electronic device can use the first screen projection mode to send data to the second electronic device under the circumstances described in step S801. At this time, the first condition may also include: the first screen projection mode is switched to the second screen projection mode. In some embodiments, the first screen projection mode is a streaming mode, the first link is a local area network link, the second screen projection mode is a mirror mode, and the second link is a P2P link. In other embodiments, the first screen projection mode is a mirror mode, the first link is a P2P link, the second screen projection mode is a streaming mode, and the second link is a local area network link.
[0306] It is understandable that the above-mentioned link switching method can also be applied to scenarios involving multiple links, such as shared Internet access, service synchronization of distributed devices, and multi-device collaboration, and this application does not limit this.
[0307] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.
[0308] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0309] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0310] In short, the above description is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included in the scope of protection of the present invention.
Claims
1. A link switching method, characterized in that: Applied to a first electronic device, the first electronic device includes a first logical interface, a first physical interface and a third physical interface; the method includes: calling the first logical interface to send data to the second electronic device through a first link, where the first link is a physical link between the first physical interface and the second physical interface of the second electronic device, a logical link is established between the first logical interface and the second logical interface of the second electronic device, and a route from the first logical interface to the second logical interface is set to the address of the second physical interface; Upon detecting that a first condition is met, setting a route from the first logical interface to the second logical interface to an address of a fourth physical interface in the second electronic device; The first logical interface is called to send data to the second electronic device through a second link, where the second link is a physical link between the third physical interface and the fourth physical interface.
2. The method according to claim 1, characterized in that Before setting the route from the first logical interface to the second logical interface as the address of the fourth physical interface in the second electronic device, the method further includes: The second link is established between the third physical interface and the fourth physical interface.
3. The method according to claim 1 or 2, characterized in that: After calling the first logical interface to send data to the second electronic device through the second link, the method further includes: The first link with the second electronic device is disconnected.
4. The method according to any one of claims 1 to 3, characterized in that Before calling the first logical interface to send data to the second electronic device through the first link, the method further includes: The first link is established between the first physical interface and the second physical interface.
5. The method according to any one of claims 1 to 4, characterized in that The calling the first logical interface to send data to the second electronic device through the first link specifically includes: When the first electronic device projects the screen to the second electronic device in the first projection mode, calling the first logical interface to send data to the second electronic device through the first link; The first condition includes: The first screen projection mode is switched to a second screen projection mode, wherein the first screen projection mode is different from the second screen projection mode.
6. The method according to claim 5, characterized in that The first screen projection mode is a streaming mode, the second screen projection mode is a mirroring mode, the first link is a local area network link, and the second link is a point-to-point P2P link.
7. The method according to any one of claims 1 to 4, characterized in that The first condition includes: Receiving a link switching operation from a user; and / or, The first link is disturbed; and / or, When the bandwidth of the first link is smaller than the bandwidth of the second link, the amount of the data is greater than a preset value; and / or, The transmission rate of the first link is lower than a preset rate; and / or, The transmission quality of the first link is lower than a preset quality.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Upon detecting that a second condition is met, setting a route from the first logical interface to the second logical interface to the address of the second physical interface; The first logical interface is called to send data to the second electronic device through the first link.
9. The method according to claim 8, characterized in that The second condition includes: Receiving a link switching operation from a user; and / or, The second link is disturbed; and / or, When the bandwidth of the second link is smaller than the bandwidth of the first link, the amount of the data is greater than a preset value; and / or, The transmission rate of the second link is lower than a preset rate; and / or, The transmission quality of the second link is lower than a preset quality.
10. The method according to any one of claims 1 to 9, characterized in that The first electronic device further includes a fifth physical interface; and the method further includes: Upon detecting that a third condition is met, setting a route from the first logical interface to the second logical interface to an address of a sixth physical interface in the second electronic device; The first logical interface is called to send data to the second electronic device through a third link, where the third link is a physical link between the fifth physical interface and the sixth physical interface.
11. The method according to claim 10, characterized in that The third condition includes: Receiving a link switching operation from a user; and / or, The first link is disturbed; and / or, When the bandwidth of the first link is smaller than the bandwidth of the third link, the amount of the data is greater than a preset value; and / or, The transmission rate of the first link is lower than a preset rate; and / or, The transmission quality of the first link is lower than a preset quality; and / or, The third link has the highest priority or weight.
12. The method according to any one of claims 1 to 11, characterized in that Before setting the route from the first logical interface to the second logical interface as the address of the fourth physical interface in the second electronic device, the method further includes: The address of the fourth physical interface is obtained through the first link or the second link.
13. The method according to any one of claims 1 to 12, characterized in that Before the route from the first logical interface to the second logical interface is set to the address of the second physical interface in the second electronic device, the method further includes: The address of the second physical interface is obtained through the first link.
14. A multi-link transmission system, characterized in that: The device comprises a first electronic device and a second electronic device, wherein the first electronic device comprises a first logical interface, a first physical interface and a third physical interface, and the second electronic device comprises a second logical interface, a second physical interface and a fourth physical interface; The first electronic device is used to call the first logical interface to send data to the second electronic device through a first link, the first link is a physical link between the first physical interface and the second physical interface, a logical link is established between the first logical interface and the second logical interface, and a route from the first logical interface to the second logical interface is the address of the second physical interface; The first electronic device is used to detect whether a first condition is met, and if the first condition is met, the first electronic device is used to set the route from the first logical interface to the second logical interface to the address of the fourth physical interface in the second electronic device; The first electronic device is used to call the first logical interface to send data to the second electronic device through a second link, where the second link is a physical link between the third physical interface and the fourth physical interface; The second electronic device is used to receive data sent by the first electronic device.
15. An electronic device, being a first electronic device, characterized in that: include: One or more processors, one or more memories, and one or more physical interfaces; the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, wherein the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the first electronic device executes the method described in any one of claims 1 to 13.
16. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on the first electronic device, the first electronic device is caused to execute the method described in any one of claims 1 to 13.
Citation Information
Patent Citations
Communication mode switching method and communication mode switching device
CN114339812A
Link switching method, device and system in multi-link system and storage medium
CN115442918A
Communication mode switching method and communication mode switching device
CN115515165A
Group addressed data delivery
US20200396568A1
