Method, system, electronic device, medium and program product for establishing a communication link
By acquiring and comparing link resource information, electronic devices dynamically adjust the communication link type and channel, solving the problem of insufficient resource utilization in multi-device link establishment and achieving efficient communication link establishment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-12-04
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, multiple devices often struggle to fully utilize link resources when establishing a communication link, leading to link establishment failures or increased latency, which affects communication efficiency.
Electronic devices acquire and transmit link resource information, compare the priority of link recommendation information, and dynamically adjust the communication link type and channel to prioritize the establishment of high-priority links, thereby ensuring the uniformity and full utilization of link resources.
It improved the success rate of establishing connections between devices, reduced connection latency, and enhanced communication efficiency and performance.
Smart Images

Figure CN122160937A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technology, and in particular to a method, system, electronic device, medium, and program product for establishing a communication link. Background Technology
[0002] With the development of wireless communication technology, different devices can establish stable communication links to transmit data to each other using wireless communication technologies such as Bluetooth, wireless LAN, and Starlink.
[0003] In existing technologies, it is difficult to fully utilize link resources when multiple devices establish communication links with each other. Summary of the Invention
[0004] Some embodiments of this application provide a method, system, electronic device, medium, and program product for establishing a communication link. The following describes this application from multiple aspects, and the embodiments and beneficial effects of the following aspects can be referred to each other.
[0005] In a first aspect, this application provides a method for establishing a communication link for a first electronic device. The method includes: acquiring first link resource information of the first electronic device; generating first link recommendation information based on the first link resource information; sending the first link recommendation information to a second electronic device, wherein the first link recommendation information is used to instruct the second electronic device to establish a first communication link with the first electronic device; receiving second link resource information and second link recommendation information sent by a third electronic device; determining the priority of the first link recommendation information and the second link recommendation information based on the first link resource information and the second link resource information; and sending second link recommendation information to the second electronic device corresponding to the priority of the first link recommendation information being lower than the priority of the second link recommendation information, wherein the second link recommendation information is used to instruct the second electronic device to establish a second communication link with the first electronic device.
[0006] The first electronic device can acquire its own first link resource information and determine its own link resource status based on this information, such as currently established communication links and remaining supportable communication links. Then, based on its own link resource status, it generates first link recommendation information, such as the link type and channel type of the first communication link, and sends this information to the second electronic device to recommend that the second electronic device establish a first communication link with it. Then, when the first electronic device receives second link recommendation information from the third electronic device, it can compare the priorities of the first and second link recommendation information. If it determines that the priority of the first link recommendation information is lower than that of the second link recommendation information, it updates its current link recommendation information from the first link recommendation information to the second link recommendation information; that is, it no longer recommends the first communication link to the second electronic device, but instead recommends the second communication link. In this way, the second electronic device can establish a second communication link with the first electronic device based on the first electronic device's recommendation, and the first electronic device can also establish a second communication link with the third electronic device based on the third electronic device's recommendation, thus maintaining the consistency of communication links. This allows the first, second, and third electronic devices to have the opportunity to establish other types of communication links with other electronic devices, which is beneficial for fully utilizing link resources.
[0007] In some implementations, the link type includes one of the following: wireless LAN link, Bluetooth link, Wi-Fi point-to-point link, Starlink link, and Purple Bee protocol link.
[0008] In some implementations, the first link resource information includes a first number of link types supported by the first electronic device, a second number of communication links established by the first electronic device, a first device type of the first electronic device, and a first unique device identifier of the first electronic device.
[0009] The second link resource information includes the third number of link types supported by the third electronic device, the fourth number of communication links established by the third electronic device, the second device type of the third electronic device, and the second unique device identifier of the third electronic device.
[0010] The priority corresponding to the first device type is the first priority, and the priority corresponding to the second device type is the second priority;
[0011] Under the following conditions, the priority of the first link recommendation information is lower than the priority of the second link recommendation information:
[0012] The first quantity is less than the third quantity; or,
[0013] The first quantity equals the third quantity, and the second quantity is less than the fourth quantity; or...
[0014] The first quantity equals the third quantity, the second quantity equals the fourth quantity, and the first priority is lower than the second priority; or...
[0015] The first quantity equals the third quantity, the second quantity equals the fourth quantity, the first priority is the same as the second priority, the first unique device identifier is less than the second unique device identifier, and the first priority is lower than the second priority.
[0016] When comparing the priorities of the first link recommendation information and the second link recommendation information, the first electronic device can first compare the first number of link types supported by the first electronic device and the third number of link types supported by the third electronic device. If the first number is less than the third number, the priority of the first link recommendation information is lower than the priority of the second link recommendation information. If the first number is greater than the third number, the priority of the first link recommendation information is higher than the priority of the second link recommendation information.
[0017] If the first quantity equals the second quantity, then the second quantity of communication links established by the first electronic device is compared with the fourth quantity of communication links established by the third electronic device. If the second quantity is less than the fourth quantity, the priority of the first link recommendation information is lower than the priority of the second link recommendation information. If the second quantity is greater than the fourth quantity, the priority of the first link recommendation information is higher than the priority of the second link recommendation information.
[0018] If the second quantity equals the fourth quantity, then compare the first priority of the first device type of the first electronic device with the second priority of the second device type of the third electronic device. If the first priority is lower than the second priority, then the priority of the first link recommendation information is lower than the priority of the second link recommendation information. If the first priority is higher than the second priority, then the priority of the first link recommendation information is higher than the priority of the second link recommendation information.
[0019] If the first priority equals the second priority, then the first unique device identifier of the first electronic device and the second unique device identifier of the second electronic device are compared. If the first unique device identifier is less than the second unique device identifier, then the priority of the first link recommendation information is lower than the priority of the second link recommendation information. If the first unique identifier is greater than the second unique device identifier, then the priority of the first link recommendation information is higher than the priority of the second link recommendation information.
[0020] In some implementations, the first communication link is the communication link with the strongest communication performance among the multiple communication links already established by the first electronic device.
[0021] When a first electronic device has established multiple communication links, it can recommend the communication link with the strongest communication performance among these links to a second electronic device, which is beneficial for improving the communication performance between the devices. Similarly, when a third electronic device has established multiple communication links, it can also recommend the communication link with the strongest communication performance to the first electronic device.
[0022] In some implementations, sending first link recommendation information to a second electronic device includes sending a first broadcast carrying the first link recommendation information to the second electronic device.
[0023] The first electronic device may send a first broadcast carrying first link recommendation information to the second electronic device, thereby sending the first link recommendation information to the second electronic device. The first broadcast may be sent periodically, or when the link resource information of the first electronic device is updated, or when a request is received from the second electronic device.
[0024] In some implementations, receiving second link resource information and second link recommendation information sent by a third electronic device includes receiving a second broadcast sent by the third electronic device, wherein the second broadcast carries the second link resource information and the second link recommendation information.
[0025] The third electronic device can send a second broadcast carrying the second link resource information and the second link recommendation information to the first electronic device, so that the first electronic device can receive the second link resource information and the second link recommendation information.
[0026] The first and second broadcasts can be sent periodically, or when link resource information is updated, or when a request to establish a communication link is received.
[0027] In some implementations, the second link recommendation information is sent by the third electronic device after establishing the second communication link.
[0028] If the third electronic device has already established a second communication link, the third electronic device may recommend the second communication link to the first electronic device. In this case, the third electronic device may send second link recommendation information to the first electronic device, instructing the first electronic device to establish the second communication link.
[0029] In some embodiments, the method further includes: receiving a first request sent by a second electronic device, the first request being for requesting the establishment of a second communication link; and establishing a second communication link with the second electronic device in response to the first request; wherein the first request is generated based on second link recommendation information.
[0030] After receiving the second link recommendation information sent by the first electronic device, the second electronic device can send a first request to the first electronic device to request the establishment of a second communication link based on the second link recommendation information. After receiving the first request from the second electronic device, the first electronic device can respond to the first request and establish a second communication link with the second electronic device.
[0031] In some implementations, the method further includes establishing a second communication link with a third electronic device.
[0032] After receiving the second link recommendation information sent by the third electronic device, the first electronic device may also send a second request to the third electronic device to request the establishment of a second communication link based on the second link recommendation information. Upon receiving the second request, the third electronic device shall establish a second communication link with the first electronic device in response to the second request.
[0033] Secondly, this application provides a method for establishing a communication link in a system including a first electronic device, a second electronic device, and a third electronic device, the method comprising:
[0034] The first electronic device acquires the first link resource information and generates first link recommendation information based on the first link resource information;
[0035] The first electronic device sends a first link recommendation information to the second electronic device, wherein the first link recommendation information is used to instruct the second electronic device to establish a first communication link with the first electronic device;
[0036] The third electronic device sends the second link resource information and the second link recommendation information to the first electronic device;
[0037] The first electronic device determines the priority of the first link recommendation information and the second link recommendation information based on the first link resource information and the second link resource information;
[0038] Since the priority of the first link recommendation information is lower than that of the second link recommendation information, the first electronic device sends the second link recommendation information to the second electronic device. The second link recommendation information is used to instruct the second electronic device to establish a second communication link with the first electronic device.
[0039] The first electronic device can acquire its own first link resource information and determine its own link resource status based on this information, such as currently established communication links and remaining supportable communication links. Then, based on its own link resource status, it generates first link recommendation information, such as the link type and channel type of the first communication link, and sends this information to the second electronic device to recommend that the second electronic device establish a first communication link with it. Then, when the first electronic device receives second link recommendation information from the third electronic device, it can compare the priorities of the first and second link recommendation information. If it determines that the priority of the first link recommendation information is lower than that of the second link recommendation information, it updates its current link recommendation information from the first link recommendation information to the second link recommendation information; that is, it no longer recommends the first communication link to the second electronic device, but instead recommends the second communication link. In this way, the second electronic device can establish a second communication link with the first electronic device based on the first electronic device's recommendation, and the first electronic device can also establish a second communication link with the third electronic device based on the third electronic device's recommendation, thus maintaining the consistency of communication links. This allows the first, second, and third electronic devices to have the opportunity to establish other types of communication links with other electronic devices, which is beneficial for fully utilizing link resources.
[0040] In some implementations, the first link resource information includes a first number of link types supported by the first electronic device, a second number of communication links established by the first electronic device, a first device type of the first electronic device, and a first unique device identifier of the first electronic device.
[0041] The second link resource information includes the third number of link types supported by the second electronic device, the fourth number of communication links established by the second electronic device, the second device type of the second electronic device, and the second unique device identifier of the second electronic device.
[0042] The priority corresponding to the first device type is the first priority, and the priority corresponding to the second device type is the second priority;
[0043] Under the following conditions, the priority of the first link recommendation information is lower than the priority of the second link recommendation information:
[0044] The first quantity is less than the third quantity; or,
[0045] The first quantity equals the third quantity, and the second quantity is less than the fourth quantity; or...
[0046] The first quantity equals the third quantity, the second quantity equals the fourth quantity, and the first priority is lower than the second priority; or...
[0047] The first quantity equals the third quantity, the second quantity equals the fourth quantity, the first priority is the same as the second priority, the first unique device identifier is less than the second unique device identifier, and the first priority is lower than the second priority.
[0048] In some implementations, the method further includes:
[0049] The second electronic device sends a first request to the first electronic device, the first request being used to request the establishment of a second communication link;
[0050] The first electronic device responds to the first request and establishes a second communication link with the second electronic device;
[0051] The first request is generated based on the recommendation information from the second link.
[0052] In some implementations, the method further includes:
[0053] The first electronic device sends a second request to the third electronic device, wherein the second request is for requesting the establishment of a second communication link. The third electronic device responds to the second request and establishes a second communication link with the first electronic device.
[0054] Thirdly, embodiments of this application provide a communication system including a first electronic device, a second electronic device, and a third electronic device. The first electronic device performs the steps of the method provided in the first aspect, the second electronic device performs the steps of the method provided in the first aspect, and the third electronic device performs the steps of the method provided in the first aspect. The beneficial effects achievable in this third aspect can be referenced to the beneficial effects of the methods provided in either the first or second aspect, and will not be repeated here.
[0055] Fourthly, embodiments of this application provide an electronic device, including: a memory for storing instructions; and a processor, which, when executing the instructions in the memory, causes the electronic device to perform the method described in any embodiment of the first aspect of this application. The beneficial effects achievable in this fourth aspect can be found in the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here.
[0056] Fifthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described in any embodiment of the first aspect. The beneficial effects achievable through the fifth aspect can be found in the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here.
[0057] Sixthly, embodiments of this application provide a computer program product including a computer program / instructions. When the computer program / instructions are executed on a computer, the computer causes the computer to implement the method described in any embodiment of the first aspect. The beneficial effects achievable in the sixth aspect can be found in the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here. Attached Figure Description
[0058] Figure 1 According to some embodiments of this application, a scenario diagram of multi-device link establishment conflict is shown;
[0059] Figure 2 According to some embodiments of this application, another scenario diagram of multi-device link establishment conflict is shown;
[0060] Figure 3 According to some embodiments of this application, scenario diagrams illustrating where communication links are not recommended are shown;
[0061] Figure 4A According to some embodiments of this application, a scenario diagram of a recommended communication link is shown;
[0062] Figure 4B According to some embodiments of this application, a scenario diagram of establishing a link according to a recommended communication link is shown;
[0063] Figure 5A According to some embodiments of this application, a scenario diagram of another recommended communication link is shown;
[0064] Figure 5B According to some embodiments of this application, another scenario diagram of establishing a link according to a recommended communication link is shown;
[0065] Figure 6 According to some embodiments of this application, a schematic diagram is shown of device A and device B respectively sending link recommendation information to device C;
[0066] Figure 7 According to some embodiments of this application, a flowchart of a method for determining the priority of link recommendation information is shown;
[0067] Figure 8A According to some embodiments of this application, a scenario diagram for updating link recommendation information is shown;
[0068] Figure 8B According to some embodiments of this application, a scenario diagram is shown that keeps the link recommendation information unchanged;
[0069] Figure 9A According to some embodiments of this application, another scenario diagram for updating link recommendation information is shown;
[0070] Figure 9B According to some embodiments of this application, another scenario diagram for updating link recommendation information is shown;
[0071] Figure 10 According to some embodiments of this application, a flowchart of a method for establishing a communication link is shown;
[0072] Figure 11 A schematic diagram of the electronic device is shown. Detailed Implementation
[0073] The embodiments of this application provide a method for establishing a communication link, which improves the efficiency of link establishment between devices and reduces the establishment delay between devices.
[0074] Terminology Explanation:
[0075] (1) Chain building
[0076] Link establishment refers to setting up communication connections between different devices in a communication system, enabling stable and efficient data transmission between them. For example, a mobile phone can establish a communication connection with a tablet using wireless communication technology P1, allowing the phone and tablet to communicate.
[0077] It is understood that wireless communication technology P1 includes, but is not limited to, wireless local area networks (WLAN), wireless fidelity peer-to-peer (Wi-Fi P2P) (e.g., HML (Huwei Magneto Link) (a Wi-Fi P2P technology), Bluetooth (e.g., basic rate (BR), Bluetooth Low Energy (BLE), StarFlash, Zigbee, etc.).
[0078] In the following text, a communication connection established using wireless communication technology P1 will be referred to as a "P1 link". For example, a communication connection established using HML technology will be referred to as an "HML link".
[0079] To avoid channel interference, when a device uses multiple different types of wireless communication technologies to establish multiple different types of links with other devices, these multiple types of links typically use different channels.
[0080] (2) Channel
[0081] A channel, also known as a transmission channel (CH), is a data signal transmission channel that uses wireless signals (electromagnetic waves) as the transmission carrier. The 802.11 protocol, developed by the Institute of Electrical and Electronics Engineers (IEEE), specifies multiple operating channels, some of which are located in the 2.4 GHz band, such as channels 1 to 14, and some are located in the 5 GHz band, such as channels 36 to 165.
[0082] (3) Same frequency and same communication mode, also known as "simultaneous same frequency full-duplex mode".
[0083] Same-frequency, same-communication mode refers to the working mode in wireless communication where devices can simultaneously transmit and receive data on the same frequency.
[0084] (4) Dual-band dual concurrency (DBDC) mode
[0085] DBDC mode allows devices to operate simultaneously on two different frequency bands. Specifically, DBDC technology enables devices to transmit data using both the 2.4 GHz and 5 GHz frequency bands at the same time. This technology improves network throughput, coverage, and capacity, while reducing interference and improving signal quality.
[0086] In DBDC mode, electronic devices can operate simultaneously on the 2.4 GHz and 5 GHz frequency bands.
[0087] (5) Dual-frequency adaptive concurrent (dynamic bandwidth allocation and control, DBAC) mode
[0088] DBAC is a dynamic bandwidth allocation and control technology. In DBAC mode, electronic devices can only communicate on one of the frequency bands, 2.4 GHz and 5 GHz, at any given time.
[0089] The method provided in this application can be applied to any electronic device, including but not limited to mobile stations (MS) and mobile terminals (MT). For example, electronic devices can be mobile phones, smart TVs, wearable devices (such as watches, bracelets, and headphones), tablets, desktop computers, laptops, personal computers (PCs), virtual reality (VR) devices, augmented reality (AR) devices, terminals in industrial control, terminals in self-driving cars, terminals in remote medical surgery, terminals in smart grids, terminals in transportation safety (such as vehicle infotainment systems), terminals in smart cities, terminals in smart homes (such as air conditioners, refrigerators, fans, lights, televisions, and speakers), and so on. This application does not limit the specific form of the electronic device.
[0090] Figure 1 According to some embodiments of this application, a scenario diagram of multi-device link establishment conflict is shown.
[0091] refer to Figure 1 Access point (AP) device 1's current operating channel for its wireless local area networks (WLAN) is channel 36. AP device 2's current operating channel for its WLAN is channel 149. Mobile phone 20 has built-in wireless network cards A1 and B1. PC 30 has built-in wireless network cards A2 and B2. Tablet 10 has built-in wireless network card B3. Wireless network cards A1 and A2 support establishing WLAN links using WLAN communication technology. Wireless network cards B1, B2, and B3 support establishing HML links using HML communication technology.
[0092] Mobile phone 20 uses wireless network card A1 to establish a WLAN link with AP device 1 through channel 36.
[0093] PC 30 uses wireless network card A2 to establish a WLAN link with AP device 2 through channel 149, and uses wireless network card B2 to establish an HML link with tablet 10 through channel 149.
[0094] The tablet 10 operates in DBAC mode. In DBAC mode, the tablet 10's built-in wireless network card B3 only supports establishing multiple HML links using a single channel.
[0095] Since mobile phone 20 has already established a link with AP device 1 through channel 36, in order to make full use of channel resources, when mobile phone 20 establishes an HML link with tablet 10, mobile phone 20 may preferentially choose channel 36 to establish an HML link with tablet 10. However, since the wireless network card B3 of tablet 10 has occupied channel 149, tablet 10 can only use channel 149 to establish an HML link and cannot use other channels to establish an HML link.
[0096] Therefore, when mobile phone 20 uses wireless network card B1 to negotiate and establish an HML link with tablet 10 through channel 36, a channel conflict occurs, causing the link establishment between mobile phone 20 and tablet 10 to fail. In this case, mobile phone 20 needs to re-negotiate with tablet 10 to establish an HML link through channel 149. The renegotiation process will prolong the link establishment time between mobile phone 20 and tablet 10, increase the link establishment delay between mobile phone 20 and tablet 10, and affect the communication efficiency between mobile phone 20 and tablet 10.
[0097] Figure 2 According to some embodiments of this application, another scenario diagram of multi-device link establishment conflict is shown.
[0098] refer to Figure 2 The built-in wireless network card B3 of Tablet 10 only supports a maximum of 8 HML links. Currently, Tablet 10 has established 8 HML links with PC 30 and devices A through G (8 devices in total) via the same channel, such as channel 149. At this point, Tablet 10 has reached its maximum HML link load and cannot establish any more new HML links. In this situation, when Mobile Phone 20 requests to establish an HML link with Tablet 10 via channel 149, a link establishment conflict will occur, causing the link establishment between Mobile Phone 20 and Tablet 10 to fail. At this time, Mobile Phone 20 needs to switch to another link establishment method to re-establish the link with Tablet 10 to succeed. For example, Mobile Phone 20 can re-establish a Bluetooth link with Tablet 10. However, the re-establishment process will prolong the link establishment time between Mobile Phone 20 and Tablet 10, increasing the link establishment latency and affecting the communication efficiency between Mobile Phone 20 and Tablet 10.
[0099] In view of this, embodiments of this application provide a method for establishing a communication link. In this method, electronic device U1 can first send link resource information (such as the type of established link, the number of established links, the channel used by the established link, the types of links that can be established, and the number of remaining links that can be established for each link type) to electronic device U2. Then, electronic device U2 determines the link type and channel that can be successfully established based on the link resource information and establishes a link with electronic device U1, thereby improving the success rate of link establishment and reducing the time delay of link establishment.
[0100] Furthermore, to fully utilize link resources, electronic device U1 can send link recommendation information (such as recommended link type and channel type) to electronic device U2 based on its own link resource situation. Electronic device U2 can then compare the priority of the link recommendation information sent by electronic device U1 with the priority of its own link recommendation information sent to electronic device U3. When the priority of electronic device U1's link recommendation information is higher than that of electronic device U2, electronic device U2 can update its own link recommendation information to that of electronic device U1 and send it to electronic device U3. This instructs electronic device U3 to establish the communication link recommended by electronic device U1 with electronic device U2. This ensures consistency between the communication link between electronic devices U1 and U2 and between electronic devices U2 and U3, allowing electronic devices U1, U2, and U3 to establish other types of communication links with other devices, thereby facilitating the full utilization of link resources.
[0101] It is understood that link types include, but are not limited to, WLAN links, Wi-Fi P2P links (such as HML links), Starlink links, Bluetooth links (such as BR links, BLE links, etc.), and Zigbee links. Bluetooth links can be established using asynchronous connectionless (ACL) or synchronous connection-oriented Bluetooth connection mechanisms.
[0102] The technical solution of this application will be described exemplarily below, with tablet 10 as an example of electronic device U1 and mobile phone 20 as an example of electronic device U2.
[0103] For example, in Figure 1In the scenario shown, before mobile phone 20 requests tablet 10 to establish a link, tablet 10 can broadcast its current link resource information (or "virtual access point (VAP) information") (e.g., tablet 10 has already established an HML link with PC 30 via channel 149) to mobile phone 20. After receiving the link resource information broadcast by tablet 10, mobile phone 20 can determine that tablet 10 has already established an HML link with PC 30 via channel 149. At this point, mobile phone 20 can choose channel 149 to establish an HML link with tablet 10 instead of channel 36. In this way, mobile phone 20 can successfully establish a link with tablet 10 in one go without channel conflict, thereby improving the link establishment speed and reducing latency.
[0104] For example, in Figure 2 In the scenario shown, before the mobile phone 20 requests the tablet 10 to establish a connection, the tablet 10 can broadcast its current link resource information (e.g., the link types supported by the tablet 10 include HML links and Bluetooth links, the maximum number of HML links supported by the tablet 10 is 8, and the tablet 10 has currently established 8 HML links, etc.) to the mobile phone 20. After receiving the link resource information broadcast by the tablet 10, the mobile phone 20 can determine that the tablet 10 supports establishing HML links and Bluetooth links, that the tablet 10 supports establishing a maximum of 8 HML links, and that 8 HML links have already been established. At this point, the mobile phone 20 can request the tablet 10 to establish a Bluetooth link instead of requesting to establish an HML link. Alternatively, the mobile phone 20 can also request the tablet 10 to disconnect one or more established HML links, and then establish an HML link with the tablet 10 after the tablet 10 disconnects one or more established HML links. In this way, the mobile phone 20 can successfully establish a connection with the tablet 10 in one go without connection conflict, thereby improving the connection establishment speed between the mobile phone 20 and the tablet 10 and reducing connection establishment latency.
[0105] It is understandable that electronic device U1 can send link resource information to electronic device U2 in a variety of different ways, such as broadcasting, server push, sending Wi-Fi Action frames, etc., without limitation.
[0106] In some embodiments, electronic device U1 may periodically broadcast link resource information, or broadcast link resource information when an update to the link resource information is detected, or broadcast link resource information when a link establishment request is received, so that electronic device U2 can receive the link resource information broadcast by electronic device U1 by scanning the broadcast.
[0107] It is understandable that electronic devices can improve the success rate of link establishment and reduce the establishment delay by pre-broadcasting synchronized link resource information. For example, in some embodiments, the success rate of link establishment can be increased from 90% to over 98%, and the link establishment delay can be optimized from 2 seconds to less than 1 second.
[0108] In other embodiments, when electronic device U1 and electronic device U2 are logged into the same account, electronic device U1 can push link resource information to electronic device U2 through the server.
[0109] In some embodiments, in addition to sending link resource information to electronic device U2 so that electronic device U2 can determine the link type and channel for establishing the link based on the link resource information sent by electronic device U1, electronic device U1 can also send link recommendation information (such as recommended link type and channel) to electronic device U2 so that electronic device U2 can jointly decide on the link type and channel of the communication link established with electronic device U1 based on the link recommendation information and link resource information sent by electronic device U1.
[0110] In some embodiments, electronic device U1 may not make any recommendations when no communication link is established.
[0111] For example, such as Figure 3 As shown, if the tablet 10 does not establish a communication link with any other device, the tablet 10 may not make any recommendations to the mobile phone 20. That is, the tablet 10 may not send link recommendation information to the mobile phone 20, or the tablet 10 may send link recommendation information containing a recommendation value FF to the mobile phone 20, where the recommendation value FF indicates no recommendation.
[0112] In other embodiments, when electronic device U1 has already established a communication link with other devices, electronic device U1 may recommend the communication link that electronic device U1 has already established to electronic device U2.
[0113] For example, such as Figure 4A As shown, when the tablet 10 has already established a WLAN link with the AP device 1 through channel 36, the tablet 10 can recommend that the mobile phone 20 establish a WLAN link with other devices (such as the tablet 10) through channel 36.
[0114] It is understandable that in a multi-device link establishment scenario, when electronic device U1 has already established a communication link, electronic device U1 will actively recommend the communication link that electronic device U1 has already established to electronic device U2, which is conducive to making full use of channel resources and thus connecting more devices.
[0115] For example, in Figure 4AIn the scenario shown, after tablet 10 recommends a 36-channel WLAN link to mobile phone 20, as follows: Figure 4B As shown, mobile phone 10 can establish WLAN links with AP device 2 and tablet 10 respectively, according to the recommendation of tablet 10. In this way, the resources of channel 36 can be fully utilized, allowing tablet 10 and mobile phone 20 to have the opportunity to establish communication connections with other devices using other channels, which is beneficial for tablet 10 and mobile phone 20 to connect to more devices in the future.
[0116] In some other embodiments, when electronic device U1 has established multiple communication links with other electronic devices, electronic device U1 may preferentially recommend the link type and channel of the communication link with the best communication performance among the multiple communication links to electronic device U2.
[0117] For example, such as Figure 5A As shown, tablet 10 has established a WLAN link with AP device 1 via channel 36, and an HML link with PC 30 via channel 149. Since the communication performance of the HML link is better than that of the WLAN link, tablet 10 can recommend that mobile phone 20 establish an HML link via channel 149 when establishing a link with other devices (such as tablet 20).
[0118] It is understandable that in a multi-device link establishment scenario, when electronic device U1 has already established multiple communication links, electronic device U1 will prioritize recommending the communication link with the strongest communication performance to electronic device U2 from the established communication links, which is beneficial to ensuring the communication performance when multiple devices are connected.
[0119] For example, in Figure 5A In the scenario shown, after tablet 10 recommends a 149-channel HML link to mobile phone 20, as follows: Figure 5B As shown, mobile phone 20 can establish 149-channel HML links with mobile phone 40 and tablet 10 respectively, as recommended by tablet 10, instead of establishing 36-channel WLAN links, which is beneficial to improving the communication performance between tablet 10, mobile phone 20 and mobile phone 40.
[0120] In some embodiments, when electronic device U2 receives link resource information and link recommendation information from electronic device U1, electronic device U2 first determines the link type and channel that can successfully establish a link with electronic device U1 based on the link resource information. Then, it uses the link recommendation information sent by electronic device U1 as a reference to determine a more reasonable link type and channel from the link type and channel determined based on the link resource information. For example, if the link type and channel determined by electronic device U2 based on the link resource information sent by electronic device U1 includes the link type and channel recommended by electronic device U1, then electronic device U2 can use the link type and channel recommended by electronic device U1 as the link type and channel to request establishing a link with electronic device U1. Otherwise, electronic device U2 can use the link type and channel determined based on the link resource information as the link type and channel to request establishing a link with electronic device U1.
[0121] For example, in Figure 5A In the scenario shown, before establishing a link between mobile phone 20 and tablet 10, tablet 10 can broadcast current link resource information and link recommendation information to mobile phone 20. The link resource information indicates that tablet 10 supports WLAN, HML, and Bluetooth link types, and that tablet 10 has established one WLAN link and one HML link. The link recommendation information indicates that tablet 10 recommends an HML link using channel 149. At this time, mobile phone 20 can determine, based on the link resource information sent by tablet 10, whether it can establish an HML link with tablet 10 via channel 149, or establish other types of Bluetooth links via other channels (such as channel 39). Since tablet 10 recommends an HML link using channel 149, mobile phone 20 can request tablet 10 to establish an HML link via channel 149.
[0122] It's understandable that in scenarios involving multiple devices establishing links, each device can send link recommendation information to surrounding devices. Therefore, a single device may receive multiple link recommendation messages.
[0123] For example, such as Figure 6 As shown, both device A and device B send link recommendation information to device C. If the link recommendation information sent by device A and device B is inconsistent, such as recommending different communication links, device C needs to select one link recommendation information from those sent by device A and device B as the reference link recommendation information when making a link establishment decision. In some embodiments, device C can use the link recommendation information with higher priority as the reference link recommendation information when making a link establishment decision.
[0124] The following is combined with Figure 6 The scenario shown illustrates the priority judgment rules for link recommendation information.
[0125] (1) The more link types supported, the higher the priority of link recommendation information.
[0126] It's understandable that different types of chips support different link types and the number of link types they support. If different electronic devices have different types of built-in chips, the number of link types supported by those devices will also differ.
[0127] If device A supports a greater number of link types than device B, then the link recommendation information from device A has a higher priority than that from device B. Conversely, if device A supports a fewer link types than device B, then the link recommendation information from device B has a higher priority than that from device A.
[0128] For example, device A supports three link types: WLAN, HML, and Bluetooth, while device B supports four link types: WLAN, HML, Bluetooth, and Starlink. Device A recommends a 36-channel WLAN link to device C, while device B recommends a 149-channel HML link. Since device B supports more link types than device A, device C can prioritize establishing a 149-channel HML link during connection establishment.
[0129] It is understandable that the more link types an electronic device supports, the more devices it can connect in the future, the stronger its ability as a central device, and the higher the priority of its link recommendation information, which is beneficial for connecting more devices in the future.
[0130] (2) If the number of supported link types is the same, the more established communication links there are, the higher the priority of the link recommendation information.
[0131] If devices A and B support the same number of link types, and device A has more established communication links than device B, then the link recommendation information from device A has a higher priority than that from device B. Conversely, if device A has fewer established communication links than device B, then the link recommendation information from device A has a lower priority than that from device B.
[0132] For example, both Device A and Device B support three link types: WLAN, HML, and Bluetooth. If Device A has established three communication links and Device B has established four, then the link recommendation information of Device B has a higher priority than the link recommendation information of Device A.
[0133] (3) If the number of supported link types is the same and the number of established communication links is also the same, then the device types are compared. The higher the priority of the device type, the higher the priority of the link recommendation information.
[0134] It should be noted that the priority of device type is preset, and the specific setting method can be set according to the actual needs of the scenario, without any limitation.
[0135] Taking the priority order of "vehicle infotainment system > PC > large screen device (such as TV) > mobile phone > tablet > watch" as an example: if the number of link types supported by device A and device B and the number of established communication links are the same, if device A is a mobile phone and device B is a tablet, then the link recommendation information of device A has a higher priority than the link recommendation information of device B.
[0136] (4) If the number of supported link types is the same, the number of established communication links is the same, and the device types are the same, then the larger the unique device identifier (UDID), the higher the priority of the link recommendation information.
[0137] It is understandable that each device's UDID is unique, and different devices have different UDIDs.
[0138] If devices A and B support the same number of link types, have the same number of established communication links, and are of the same device type, then if device A's UDID is greater than device B's UDID, the link recommendation information from device A has a higher priority than that from device B. Conversely, if device A's UDID is less than device B's UDID, the link recommendation information from device A has a lower priority than that from device B.
[0139] Figure 7 According to some embodiments of this application, a flowchart of a method for determining the priority of link recommendation information is shown.
[0140] like Figure 7 As shown, the method includes:
[0141] S701: Device A sends link resource information and link recommendation information to Device C.
[0142] In some embodiments, the link resource information sent by device A may include the number of links supported by device A (L1), the number of communication links currently established by device A (L3), the priority of device type of device A (Y1), and the UDID_1 of device A. Link recommendation information may include communication links recommended by device A.
[0143] S702: Device B sends link resource information and link recommendation information to device C.
[0144] In some embodiments, the link resource information sent by device B may include the number of links supported by device B (L2), the number of communication links currently established by device B (L4), the priority of device type of device A (Y2), and the UDID_2 of device A. Link recommendation information may include communication links recommended by device A.
[0145] It should be noted that the order of S701 and S702 is not limited in the embodiments of this application. S701 can be executed before S702, after S702, or in parallel with S702.
[0146] S703: Device C compares the number of link types supported by device A (L1) with the number of link types supported by device B (L2).
[0147] If L1 > L2, execute S707; if L1 = L2, execute S704; if L1 < L2, execute S708.
[0148] In some embodiments, after receiving link resource information and link recommendation information sent by devices A and B, device C can compare the number L1 of link types supported by device A with the number L2 of link types supported by device B. If the number L1 of link types supported by device A is greater than the number L2 of link types supported by device B, it indicates that the link recommendation information of device A has a higher priority than the link recommendation information of device B, and device C can use the link recommendation information of device A as reference link recommendation information. If the number L1 of link types supported by device A is equal to the number L2 of link types supported by device B, the number of established communication links between device A and device B is further compared. If the number L1 of link types supported by device A is less than the number L2 of link types supported by device B, it indicates that the link recommendation information of device B has a higher priority than the link recommendation information of device A, and device C can use the link recommendation information of device A as reference link recommendation information.
[0149] S704: Device C compares the number of communication links L3 established by device A with the number of communication links L4 established by device B.
[0150] If L3 > L4, execute S707; if L3 = L4, execute S705; if L3 < L4, execute S708.
[0151] In some embodiments, device C can compare the number of communication links established by device A (L3) and device B (L4). If the number of communication links established by device A (L3) is greater than the number of communication links established by device B (L4), it indicates that the link recommendation information of device A has a higher priority than the link recommendation information of device B, and device C can use the link recommendation information of device A as the reference link recommendation information. If the number of link types supported by device A (L1) is equal to the number of link types supported by device B (L2), then the priority of the device types of device A and device B is further compared. If the number of communication links established by device A (L3) is less than the number of communication links established by device B (L4), it indicates that the link recommendation information of device B has a higher priority than the link recommendation information of device A, and device C can use the link recommendation information of device B as the reference link recommendation information.
[0152] S705; Device C compares the priority Y1 of device type of device A with the priority Y2 of device type of device B.
[0153] If Y1 > Y2, execute S707; if Y1 = Y2, execute S706; if Y1 < Y2, execute S708.
[0154] In some embodiments, device C can compare the priority Y1 of device type of device A and the priority Y2 of device type of device B. If the priority Y1 of device type of device A is higher than the priority Y2 of device type of device B, it means that the priority of link recommendation information of device A is higher than the priority of link recommendation information of device B, and device C can use the link recommendation information of device A as the reference link recommendation information. If the priority Y1 of device type of device A is equal to the priority Y2 of device type of device B, then the comparison of UDID of device A and device B continues. If the priority Y1 of device type of device A is lower than the priority Y2 of device type of device B, it means that the priority of link recommendation information of device A is lower than the priority of link recommendation information of device B, and device C can use the link recommendation information of device B as the reference link recommendation information.
[0155] S706: Device C compares UDID_1 of device A with UDID_2 of device B.
[0156] If UDID_1 > UDID_2, execute S707; if UDID_1 < UDID_2, execute S708.
[0157] In some embodiments, device C can compare UDID_1 of device A and UDID_2 of device B. If UDID_1 of device A is greater than UDID_2 of device B, it indicates that the link recommendation information of device A has a higher priority than the link recommendation information of device B, and device C can use the link recommendation information of device A as the reference link recommendation information. If UDID_1 of device A is less than UDID_2 of device B, it indicates that the link recommendation information of device A has a lower priority than the link recommendation information of device B, and device C can use the link recommendation information of device B as the reference link recommendation information.
[0158] S707: Device C determines that the link recommendation information of device A has a higher priority than the link recommendation information of device B.
[0159] S708: Device C determines that the link recommendation information of device B has a higher priority than the link recommendation information of device A.
[0160] In this embodiment of the application, by comparing the number of link types supported by device A and device B, the number of established communication links, the priority of the device type and UDID, the priority of the link recommendation information sent by device A and device B to device C can be determined, and the corresponding reference link recommendation information can be determined based on the priority.
[0161] It's understandable that the link recommendation information for each device can be updated in real time.
[0162] The following section introduces the rules for updating link recommendation information.
[0163] In some embodiments, when an electronic device receives link recommendation information from other devices, it can compare the priority of the received link recommendation information with its own link recommendation information and update its own link recommendation information to the highest priority link recommendation information. This helps ensure the consistency of links among multiple devices and facilitates the full utilization of link resources.
[0164] For example, such as Figure 8AAs shown, devices A through F support the same number of link types. Device A establishes a 36-channel WLAN link with device B, and device C establishes 149-channel HML links with devices D and F respectively. Device A sends link recommendation information to device E, recommending that device E establish a 36-channel WLAN link. Device C sends link recommendation information to device A, recommending that device A establish a 149-channel HML link. Since device C has already established two communication links, while device A has only established one, device C's link recommendation information has a higher priority than device A's. After receiving the link recommendation information from device C, device A can update its own link recommendation information to match device C's, recommending that device E establish a 149-channel WLAN link. Furthermore, device A can update its current communication link with device B from a 36-channel WLAN link to a 149-channel HML link according to device C's recommendation.
[0165] For example, such as Figure 8B As shown, devices A through H support the same number of link types. Device A establishes 149-channel HML links with devices B, G, and H respectively. Device C establishes 36-channel WLAN links with devices D and F respectively. Device A sends link recommendation information to device E, recommending that device E establish a 149-channel HML link. Device C sends link recommendation information to device A, recommending that device A establish a 36-channel WLAN link. Since device C has already established 2 communication links and device A has established 3 communication links, the priority of device C's link recommendation information is lower than that of device A's link recommendation information. After receiving the link recommendation information sent by device C, device A keeps its current link recommendation information unchanged; that is, device A continues to recommend a 149-channel HML link to device E.
[0166] It is understandable that, based on the above link recommendation information update rules (dynamic rules), high-priority devices can influence low-priority devices, allowing low-priority devices to follow the high-priority devices in recommending communication links to other devices. In other words, high-priority devices can spread their link recommendation information to low-priority devices, achieving global (to all devices to be connected) propagation. This is beneficial for achieving globally optimal link establishment.
[0167] In some embodiments, if the electronic device does not make any recommendations to other devices, when the electronic device receives link recommendation information sent by other electronic devices, the electronic device can select the link recommendation information with the highest priority from the received link recommendation information and send it to the other electronic devices.
[0168] For example, such as Figure 9AAs shown, since device A has not established a communication link with any other device, it does not make any recommendations to other devices, such as device D. However, since device B has established a 149-channel HML link with device C, device B can recommend a 149-channel HML link to device A. After receiving the recommended 149-channel HML link from device B, device A can recommend a 149-channel HML link to device D. Thus, when device D establishes a link with other devices, such as device B, it will prioritize establishing a 149-channel HML link, avoiding link establishment conflicts and improving link establishment efficiency.
[0169] For example, such as Figure 9B As shown, devices A through G support the same number of link types. Since device A has not established communication links with any other devices, it does not make any recommendations to other devices, such as device D. Because device B has established a 36-channel WLAN link with device C, it can recommend a 36-channel WLAN link to device A. Because device E has established 149-channel HML links with both devices F and G, it can recommend a 149-channel HML link to device A. Since device E has established two communication links while device B has only established one, the 149-channel HML link of device E has a higher priority than the recommended 36-channel WLAN link of device B. Therefore, device A can choose the highest-priority 149-channel HML link to recommend to device D.
[0170] It's understandable that in scenarios involving multiple devices establishing a connection, each device can prioritize operating in the mode with the strongest communication performance. Taking the same-frequency, same-communication mode, DBDC mode, and DBAC mode as examples: since the communication performance of these modes, from highest to lowest, is: Same-frequency, same-communication mode > DBDC mode > DBAC mode, each device can select its operating mode according to the priority order: Same-frequency, same-communication mode > DBDC mode > DBAC mode.
[0171] Figure 10 According to some embodiments of this application, a schematic diagram of a method for establishing a communication link is shown.
[0172] like Figure 10 As shown, the method includes:
[0173] S1001: The first electronic device obtains the first link resource information of the first electronic device, and generates the first link recommendation information based on the first link resource information.
[0174] In some embodiments, the first link resource information may include information such as the link types supported by the first electronic device, the number of supported link types, the link types and channel types of established communication links, and the number of established communication links. The first link resource information is used to indicate the communication links currently supported by the first electronic device. The first link recommendation information may include the link types and channel types of communication links recommended by the first electronic device.
[0175] In some embodiments, the first electronic device may obtain its own first link resource information and generate first link recommendation information based on its own first link resource information.
[0176] S1002: The first electronic device sends a first link recommendation information to the second electronic device, wherein the first link recommendation information is used to instruct the second electronic device to establish a first communication link with the first electronic device.
[0177] In some embodiments, the first electronic device may send a first broadcast carrying first link recommendation information to the second electronic device, so as to send the first link recommendation information to the second electronic device through the first broadcast.
[0178] For example, such as Figure 8A As shown, device A has currently established a 36-channel WANN link with device B. Device A (as the first electronic device) can broadcast a first link recommendation to device E (as the second electronic device), recommending that device E establish a 36-channel WANN link with device A (as the first communication link).
[0179] In some embodiments, the first communication link may be the communication link with the strongest communication performance among a plurality of communication links established by the first electronic device.
[0180] S1003: The third electronic device sends the second link resource information and the second link recommendation information to the first electronic device.
[0181] In some embodiments, after the third electronic device establishes a second communication link, the third electronic device can obtain its own second link resource information and generate second link recommendation information based on the second link resource information to indicate the establishment of the second communication link. Then, the third electronic device can send a second broadcast carrying the second link recommendation information to the first electronic device to send the second link recommendation information to the first electronic device through the second broadcast.
[0182] For example, such as Figure 8AAs shown, device C (as a third electronic device) establishes 149-channel HML links (as a second communication link) with devices D and F respectively. Device C can broadcast second link recommendation information to device A to recommend that device A establish a 49-channel HML link with device C.
[0183] S1004: The first electronic device determines, based on the first link resource information and the second link resource information, whether the priority of the first link recommendation information is lower than the priority of the second link recommendation information.
[0184] If yes, then execute S1005; otherwise, do nothing.
[0185] In some embodiments, after obtaining the first link resource information and the second link resource information, the first electronic device can determine whether the priority of the first link recommendation information is lower than the priority of the second link recommendation information based on the first link resource information and the second link resource information. If the priority of the first link recommendation information is lower than the priority of the second link recommendation information, the first electronic device can execute the following S1005. If the priority of the first link recommendation information is higher than the priority of the second link recommendation information, the first electronic device does not perform any processing.
[0186] In some embodiments, the first electronic device may first compare the first number of link types supported by the first electronic device with the third number of link types supported by the third electronic device. If the first number is less than the third number, the priority of the first link recommendation information is lower than the priority of the second link recommendation information. If the first number is greater than the third number, the priority of the first link recommendation information is higher than the priority of the second link recommendation information.
[0187] If the first quantity equals the second quantity, then the second quantity of communication links established by the first electronic device is compared with the fourth quantity of communication links established by the third electronic device. If the second quantity is less than the fourth quantity, the priority of the first link recommendation information is lower than the priority of the second link recommendation information. If the second quantity is greater than the fourth quantity, the priority of the first link recommendation information is higher than the priority of the second link recommendation information.
[0188] If the second quantity equals the fourth quantity, then compare the first priority of the first device type of the first electronic device with the second priority of the second device type of the third electronic device. If the first priority is lower than the second priority, then the priority of the first link recommendation information is lower than the priority of the second link recommendation information. If the first priority is higher than the second priority, then the priority of the first link recommendation information is higher than the priority of the second link recommendation information.
[0189] If the first priority equals the second priority, then the first UDID of the first electronic device and the second UDID of the second electronic device are compared. If the first UDID is less than the second UDID, then the priority of the first link recommendation information is lower than the priority of the second link recommendation information. If the first UDID is greater than the second UDID, then the priority of the first link recommendation information is higher than the priority of the second link recommendation information.
[0190] It should be noted that the specific process for prioritizing the first-link recommendation information and the second-link recommendation information can be referred to the aforementioned [section / section]. Figure 7 The relevant information will not be repeated here.
[0191] S1005: The first electronic device sends a second link recommendation information to the second electronic device, wherein the second link recommendation information is used to instruct the second electronic device to establish a second communication link with the first electronic device.
[0192] In some embodiments, when the first electronic device determines that the priority of the first link recommendation information is lower than the priority of the second link recommendation information, the first electronic device can update its own link recommendation information from the first link recommendation information to the second link recommendation information, and then send the second link recommendation information to the second electronic device to instruct the second electronic device to establish a second communication link with the first electronic device.
[0193] For example, such as Figure 8A As shown, when device A determines that the priority of the 149-channel HML link recommended by device C is higher than the 36-channel WLAN link recommended by device A, device A will no longer recommend the 36-channel WLAN link to device E, but will instead recommend the 149-channel HML link to device C.
[0194] S1006: The second electronic device sends a first request to the first electronic device.
[0195] The first request is used to request the establishment of a second communication link.
[0196] In some embodiments, after receiving the second link recommendation information sent by the first electronic device, the second electronic device may generate a first request to the first electronic device to establish a second communication link based on the second link recommendation information, and send the first request to the second electronic device.
[0197] For example, for Figure 8A In the scenario shown, after device A recommends an HML link with channel 149 to device E, device E requests device A to establish an HML link with channel 149.
[0198] S1007: The first electronic device responds to the first request and establishes a second communication link with the second electronic device.
[0199] In some embodiments, after receiving a first request from a second electronic device, the first electronic device may respond to the first request and establish a second communication link with the second electronic device.
[0200] For example, for Figure 8A In the scenario shown, after receiving a request from device E, device A can respond to the request and establish an HML link with device E on channel 149.
[0201] In this embodiment, electronic devices can update their own link recommendation information according to the priority of the link recommendation information, so that the communication links recommended by the electronic devices follow those of higher-priority electronic devices. This is beneficial for maintaining the consistency of communication links when multiple devices establish communication links, and allows each electronic device to have the opportunity to establish other types of links with other devices, thereby making full use of link resources.
[0202] It's understandable that different electronic devices have different built-in chips and support different types of links.
[0203] For example, Table 1 shows the link types supported by different chip models.
[0204] Table 1
[0205]
[0206] As shown in Table 2, chips 1102A, 1105, 1105C, and 1106C all support connecting to station (STA) devices and P2P devices (devices supporting P2P link establishment) simultaneously via WLAN and P2P links, respectively. They also support connecting to STA devices and HML devices (devices supporting HML link establishment) simultaneously via WLAN and HML links, respectively. Furthermore, they all support connecting to P2P devices and HML devices simultaneously via P2P and HML links, respectively. Chips 1105, 1105C, and 1106C all support connecting to P2P devices and SoftAp (soft access point) devices (devices supporting SoftAp connection) simultaneously via P2P and SoftAp links, respectively. Chips 1102A, 1105, 1105C, and 1106C do not support connecting STA devices, SoftAP devices, and HML devices at the same time, nor do they support connecting STA devices, SoftAP devices, and P2P devices at the same time.
[0207] For 2VAP scenarios (e.g., STA+P2P, STA+HML, STA+SoftAp, P2P+HML), the 1106C chip supports the coexistence (simultaneous connection) of SoftAp devices with other devices, while the 1105 chip and 1105C do not support the coexistence of SoftAp devices with other devices.
[0208] For 3VAP scenarios (e.g., STA+P2P+HML, STA+SoftAp+HML, STA+SoftAp+P2P), chips 1105, 1105C, and 1106C only support the coexistence of STA devices, SoftAp devices, and HML devices.
[0209] For example, Table 2 illustrates a bitmap structure for indicating communication resources. In some embodiments, link resource information may be stored in the bitmap structure shown in Table 2.
[0210] Table 2
[0211]
[0212] Table 1 describes a bitmap structure for indicating different types of communication resources. Each column in the table corresponds to a specific communication resource type, and each row describes the specific attributes of that resource type.
[0213] Bitmap position: The position of each communication resource type in the bitmap, from bit0 to bit7 are BR, BLE, HML, P2P, STA, AP, reserved position, and extended indicator.
[0214] Channel: Describes the channels that can be used for each type of communication resource. For example, HML, P2P, STA, and AP can use channels such as 36 and 149.
[0215] Byte overhead: describes the byte overhead required for each communication resource type. For example, BR, BLE, HML, P2P, STA, and AP require 1 byte, 1 byte, 2 bytes, 2 bytes, 2 bytes, and 2 bytes, respectively.
[0216] The heartbeat byte usage describes the heartbeat bytes used by each communication resource type. For example, BR and BLE each occupy 1 byte, HML usually has 2 VAPs coexisting (4 bytes), and a few scenarios support 3 VAPs (6 bytes).
[0217] Figure 11 A schematic diagram of the structure of the electronic device 100 is shown.
[0218] like Figure 11As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0219] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0220] The processor 110 may include one or more processing units, such as an application processor (AP), 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).
[0221] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.
[0222] 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 to power the processor 110, internal memory 121, display 194, camera 193, and wireless communication module 160, etc.
[0223] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0224] Mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G for use in electronic device 100. Wireless communication module 160 can provide wireless communication solutions including WLAN, Bluetooth, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR) for use in electronic device 100.
[0225] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
[0226] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0227] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0228] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
[0229] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area.
[0230] This application also provides a communication system, which includes a first electronic device, a second electronic device, and a third electronic device. The first electronic device is used to perform the steps executed by the first electronic device in the methods provided in the foregoing embodiments, the second electronic device is used to perform the steps executed by the second electronic device in the methods provided in the foregoing embodiments, and the third electronic device is used to perform the steps executed by the third electronic device in the methods provided in the foregoing embodiments.
[0231] This application also provides a program product that, when executed on an electronic device, enables the electronic device to implement the methods provided in the foregoing embodiments.
[0232] This application also provides a readable storage medium storing one or more programs, which, when executed by an electronic device, enable the electronic device to implement the methods provided in the foregoing embodiments.
[0233] The embodiments disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as computer programs or program code executable on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0234] Program code can be applied to input instructions to execute the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, the processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application-specific integrated circuit, or a microprocessor.
[0235] The program code can be implemented using a high-level procedural language or an object-oriented programming language to communicate with the processing system. Assembly language or machine language can also be used when needed. In fact, the mechanisms described in this application are not limited to any particular programming language. In either case, the language can be a compiled language or an interpreted language.
[0236] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored thereon on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine-readable (e.g., computer-readable) form, including but not limited to floppy disks, optical disks, optical discs, read-only memory, magneto-optical disks, random access memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, magnetic cards or optical cards, flash memory, or tangible machine-readable storage for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in the form of electrical, optical, acoustic, or other propagation signals. Therefore, machine-readable media include any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine-readable (e.g., computer-readable) form.
[0237] In the accompanying drawings, some structural or methodological features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be necessary. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Furthermore, the inclusion of structural or methodological features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may be omitted or may be combined with other features.
[0238] It should be noted that all units / modules mentioned in the device embodiments of this application are logical units / modules. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important factor; the combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed in this application. Furthermore, to highlight the innovative aspects of this application, the above-described device embodiments of this application have not introduced units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that the above-described device embodiments do not contain other units / modules.
[0239] It should be noted that in the examples and description of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0240] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.
Claims
1. A method for establishing a communication link, used in a first electronic device, characterized in that, The method includes: Obtain the first link resource information of the first electronic device, and generate first link recommendation information based on the first link resource information; Send the first link recommendation information to the second electronic device, wherein the first link recommendation information is used to instruct the second electronic device to establish a first communication link with the first electronic device; Receives second link resource information and second link recommendation information sent by a third electronic device; Based on the first link resource information and the second link resource information, the priority of the first link recommendation information and the second link recommendation information is determined; Since the priority of the first link recommendation information is lower than that of the second link recommendation information, the second link recommendation information is sent to the second electronic device, wherein the second link recommendation information is used to instruct the second electronic device to establish a second communication link with the first electronic device.
2. The method according to claim 1, characterized in that, The first link resource information includes a first number of link types supported by the first electronic device, a second number of communication links established by the first electronic device, a first device type of the first electronic device, and a first unique device identifier of the first electronic device. The second link resource information includes a third number of link types supported by the third electronic device, a fourth number of communication links established by the third electronic device, a second device type of the third electronic device, and a second unique device identifier of the third electronic device; The priority corresponding to the first device type is the first priority, and the priority corresponding to the second device type is the second priority; Under the following conditions, the priority of the first link recommendation information is lower than the priority of the second link recommendation information: The first quantity is less than the third quantity; or, The first quantity is equal to the third quantity, and the second quantity is less than the fourth quantity; or, The first quantity is equal to the third quantity, the second quantity is equal to the fourth quantity, and the first priority is lower than the second priority; or, The first quantity is equal to the third quantity, the second quantity is equal to the fourth quantity, the first priority is the same as the second priority, the first unique device identifier is less than the second unique device identifier, and the first priority is lower than the second priority.
3. The method according to claim 2, characterized in that, The first communication link is the communication link with the strongest communication performance among the multiple communication links already established by the first electronic device.
4. The method according to claim 1 or 2, characterized in that, The link type includes one of the following: Wireless LAN link, Bluetooth link, Wireless Fidelity point-to-point link, Starlink link, Purple Bee protocol link.
5. The method according to claim 1, characterized in that, Sending the first link recommendation information to the second electronic device includes: Send a first broadcast carrying the first link recommendation information to the second electronic device.
6. The method according to claim 1, characterized in that, The received second link resource information and second link recommendation information sent by the third electronic device include: The system receives a second broadcast sent by the third electronic device, wherein the second broadcast carries the second link resource information and the second link recommendation information.
7. The method according to claim 1, characterized in that, The second link recommendation information is sent by the third electronic device after establishing the second communication link.
8. The method according to claim 1, characterized in that, The method further includes: The system receives a first request sent by the second electronic device, the first request being used to request the establishment of the second communication link; In response to the first request, establish the second communication link with the second electronic device; The first request is generated based on the second link recommendation information.
9. The method according to claim 1, characterized in that, The method further includes: Establish the second communication link with the third electronic device.
10. A method for establishing a communication link, used in a system comprising a first electronic device, a second electronic device, and a third electronic device, characterized in that, The method includes: The first electronic device acquires first link resource information and generates first link recommendation information based on the first link resource information; The first electronic device sends the first link recommendation information to the second electronic device, wherein the first link recommendation information is used to instruct the second electronic device to establish a first communication link with the first electronic device; The third electronic device sends the second link resource information and the second link recommendation information to the first electronic device; The first electronic device determines the priority of the first link recommendation information and the second link recommendation information based on the first link resource information and the second link resource information; Since the priority of the first link recommendation information is lower than that of the second link recommendation information, the first electronic device sends the second link recommendation information to the second electronic device, wherein the second link recommendation information is used to instruct the second electronic device to establish a second communication link with the first electronic device.
11. The method according to claim 10, characterized in that, The first link resource information includes a first number of link types supported by the first electronic device, a second number of communication links established by the first electronic device, a first device type of the first electronic device, and a first unique device identifier of the first electronic device. The second link resource information includes a third number of link types supported by the third electronic device, a fourth number of communication links established by the third electronic device, a second device type of the third electronic device, and a second unique device identifier of the third electronic device; The priority corresponding to the first device type is the first priority, and the priority corresponding to the second device type is the second priority; Under the following conditions, the priority of the first link recommendation information is lower than the priority of the second link recommendation information: The first quantity is less than the third quantity; or, The first quantity is equal to the third quantity, and the second quantity is less than the fourth quantity; or, The first quantity is equal to the third quantity, the second quantity is equal to the fourth quantity, and the first priority is lower than the second priority; or, The first quantity is equal to the third quantity, the second quantity is equal to the fourth quantity, the first priority is the same as the second priority, the first unique device identifier is less than the second unique device identifier, and the first priority is lower than the second priority.
12. The method according to claim 10 or 11, characterized in that, The method further includes: The second electronic device sends a first request to the first electronic device, the first request being used to request the establishment of the second communication link; The first electronic device establishes the second communication link with the second electronic device in response to the first request; The first request is generated based on the second link recommendation information.
13. The method according to claim 10 or 11, characterized in that, The method further includes: The first electronic device sends a second request to the third electronic device, wherein the second request is used to request the establishment of the second communication link; In response to the second request, the third electronic device establishes the second communication link with the first electronic device.
14. A communication system, characterized in that, The communication system includes a first electronic device, a second electronic device, and a third electronic device, wherein the first electronic device is used to perform the steps of the method according to any one of claims 10 to 13 performed by the first electronic device, the second electronic device is used to perform the steps of the method according to any one of claims 10 to 13 performed by the second electronic device, and the third electronic device is used to perform the steps of the method according to any one of claims 10 to 13 performed by the third electronic device.
15. An electronic device, characterized in that, include: Memory, used to store instructions; A processor, when executing the instructions in the memory, causes the electronic device to perform the method of any one of claims 1 to 9.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 9 or claims 10 to 13.
17. A computer program product, characterized in that, Includes a computer program / instruction, which, when executed, causes a computer to perform the method of any one of claims 1 to 9 or claims 10 to 13.