Method of discovering and connecting electronic devices and electronic device

CN119996977BActive Publication Date: 2026-09-04HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510181615.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-03-31
Filing Date
2021-07-20
Publication Date
2026-09-04
Estimated Expiration
2041-07-20

AI Technical Summary

Technical Problem

但是这种方法无法满足在异构网络架构中,业务服务对具有多种无线技术能力设备的需求,用户体验较差

Benefits of technology

[0062]第十六方面,提供了一种芯片,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的通信设备执行第一方面至第四方面中任意一方面中的方法,或者,用于执行第一方面至第四方面中任意一方面中的任意可能的实现方式中的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996977B_ABST
    Figure CN119996977B_ABST
Patent Text Reader

Abstract

The application provides a method for discovering and connecting electronic devices and the electronic devices, the method comprising: a first electronic device broadcasting a message by using a first communication technology within a first time period (or a first time window), the first electronic device broadcasting a message by using a second communication technology within a second time period (or the first time window), and the first time period and the second time period overlapping; receiving response information sent by a second electronic device; and establishing a communication connection between the second electronic device according to the communication technology capability supported by the second electronic device. The method provided by the application simultaneously broadcasts or sends messages by using multiple communication technology capabilities (for example, BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) of all communication technology capabilities of the electronic device, meets the requirement of a service on the discovery and connection capability of a device with multiple different technology capabilities under a heterogeneous network condition, and improves the efficiency of device discovery.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application, application number 202110821297.8, was filed on July 20, 2021. The original application claimed priority to earlier application 202110351238.9, with a priority date of March 31, 2021. The entire contents of the original application are incorporated herein by reference.

[0002] This application claims priority to Chinese patent application filed on March 31, 2021, with application number 202110351238.9 and entitled "Method for discovering and connecting an electronic device and an electronic device", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of communications, and more specifically, to a method for discovering and connecting electronic devices, as well as the electronic devices themselves. Background Technology

[0004] Wireless communication networks involve various wireless and wired technologies, such as Bluetooth (BT) and Wireless Fidelity. Technologies such as NFC, Zigbee, USB, and cellular communication are used. When a device possesses capabilities in multiple wireless and wired technologies, it will use one of these technologies to discover other devices and establish communication connections and data transmission based on the type of service being transmitted and the differences in capabilities between the various wireless and wired technologies (e.g., transmission distance, bandwidth). However, this method cannot meet the needs of heterogeneous network architectures where services require devices with multiple wireless technology capabilities, resulting in a poor user experience. Summary of the Invention

[0005] This application provides a method for discovering and connecting electronic devices, as well as the electronic device itself. It utilizes all or multiple device discovery technologies (capabilities) possessed by an electronic device to simultaneously discover another device, thus meeting the requirements of service providers in heterogeneous network environments for discovering and connecting devices with diverse technological capabilities, thereby improving user experience.

[0006] In a first aspect, a method for discovering and connecting electronic devices is provided. The method includes: a first electronic device broadcasting a first message using a first communication technology during a first time period, the first message being used to query the communication technology capabilities of other devices; the first electronic device broadcasting a second message using a second communication technology during a second time period, the second message being used to query the communication technology capabilities of other devices, the first time period and the second time period overlapping; the first electronic device receiving response information (one or more response messages) sent by a second electronic device; the first electronic device determining the communication technology capabilities supported by the second electronic device based on the response information; and the first electronic device establishing a communication connection with the second electronic device based on the communication technology capabilities supported by the second electronic device.

[0007] The first aspect provides a method for discovering and connecting electronic devices. The first electronic device broadcasts messages using multiple communication technologies during overlapping time periods. Specifically, the time periods for broadcasting messages using different communication technologies overlap in the time domain (partial or complete overlap). This method utilizes all the device discovery technologies (capabilities) of the same electronic device, or multiple technologies (capabilities) from all discovery devices, to simultaneously send (broadcast) messages. This satisfies the requirements of service providers in heterogeneous network conditions for discovering and connecting devices with various technical capabilities. It can proactively discover more devices supporting distributed capabilities, achieving the integration of multiple discovery and connection technologies, improving the efficiency of discovering and connecting electronic devices, and enhancing the user experience.

[0008] In one possible implementation of the first aspect, the method further includes: the first electronic device broadcasting a third message using a third communication technology during a third time period. This third message is used to query the communication technology capabilities of other devices. The third communication technology conflicts with the first communication technology; the first and third time periods do not overlap in the time domain; and the second and third time periods overlap. In this implementation, when the first electronic device simultaneously broadcasts messages using conflicting communication technologies (e.g., conflicts in channel or air interface timing), the time periods for broadcasting messages using the conflicting communication technologies do not overlap in the time domain, while the time periods for broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain (partially or completely). This enables the simultaneous transmission (broadcasting) of messages using all the device discovery technologies (capabilities) of the same electronic device or multiple technologies (capabilities) from all device discovery technologies (capabilities), satisfying the requirements of service services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and improving user experience.

[0009] For example, in the embodiments of this application, "simultaneous transmission" can be understood as follows: A first message is broadcast using a first communication technology during a first time period, and a second message is broadcast using a second communication technology during a second time period. If the first and second communication technologies do not conflict (e.g., there are no conflicts in channel, air interface timing, etc.), then the first and second time periods may overlap in the time domain (partial or complete overlap). Based on this, a third message is broadcast using a third communication technology during a third time period. If the third communication technology conflicts with the first or second communication technology (e.g., there are conflicts in channel, air interface timing, etc.), then the third and first time periods do not overlap in the time domain, or the third and second time periods do not overlap in the time domain. In other words, "simultaneous transmission" can be understood as follows: the time periods for transmitting messages using multiple non-conflicting communication technologies overlap in the time domain (partial or complete overlap), while the time periods for transmitting messages using conflicting communication technologies do not overlap in the time domain.

[0010] Secondly, a method for discovering and connecting electronic devices is provided, the method comprising: a first electronic device broadcasting a first message using a first communication technology within a first time window, the first message being used to query the communication technology capabilities of other devices; the first electronic device broadcasting a second message using a second communication technology within the first time window, the second message being used to query the communication technology capabilities of other devices; the first electronic device receiving response information sent by a second electronic device; the first electronic device determining the communication technology capabilities supported by the second electronic device based on the response information (one or more response messages); and the first electronic device establishing a communication connection with the second electronic device based on the communication technology capabilities supported by the second electronic device.

[0011] The second aspect provides a method for discovering and connecting electronic devices. The first electronic device utilizes multiple communication technologies to simultaneously send messages within the same time window. This enables the simultaneous transmission (broadcasting) of messages using all the device discovery technologies (capabilities) of a single electronic device, or multiple technologies (capabilities) from all discovery devices. This meets the requirements of service providers in heterogeneous network conditions for discovering and connecting devices with various technical capabilities. It can proactively discover more devices supporting distributed capabilities, achieving the integration of multiple discovery and connection technologies, improving the efficiency of discovering and connecting electronic devices, and enhancing the user experience.

[0012] For example, the first time window can be understood as the shortest time unit defined in the wireless communication protocol for jointly sending a set of messages using multiple different communication technologies (e.g., BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.). This time unit is jointly observed when sending messages using BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc. That is, within the first time window, the first electronic device uses all the technologies of the discovery devices or multiple technologies of the discovery devices to send (broadcast) messages. The first time window is the shortest time unit; in other words, the first time window can be understood as the shortest time required for the first electronic device to send messages using all the technologies of the discovery devices or multiple technologies of the discovery devices. The first time window is the smallest time granularity and is not divisible in time. In the embodiments of this application, the length of the first time window can be on the order of microseconds, milliseconds, or seconds.

[0013] For example, the first time window consists of multiple time slots or multiple symbols.

[0014] In one possible implementation of the second aspect, the method further includes: the first electronic device broadcasts a third message using a third communication technology within the first time window. This third message is used to query the communication technology capabilities of other devices; wherein the third communication technology conflicts with the first communication technology. In this implementation, the first electronic device simultaneously broadcasts messages using multiple non-conflicting communication technologies within the time window (i.e., the time periods for broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain, which can be partial or complete overlap). Within the time window, the first electronic device simultaneously broadcasts messages using another communication technology. If the other communication technology conflicts with one of the communication technologies used to broadcast messages within the time window, then the conflicting communication technologies are used to send the broadcast messages in a time-division manner within the time window. This satisfies the requirement for service discovery and connection capabilities for devices with multiple different technical capabilities under heterogeneous network conditions, improving user experience.

[0015] For example, in this embodiment, "simultaneous transmission" can be understood as follows: within a time window, the electronic device simultaneously broadcasts messages using multiple non-conflicting communication technologies (i.e., the time periods for broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain, which can be partial or complete overlap; for example, multiple non-conflicting communication technologies can start broadcasting messages simultaneously). Based on this, within the same time window, another communication technology is also used to broadcast messages. If this other communication technology conflicts with one of the communication technologies used to broadcast messages within the same time window, then the conflicting communication technologies are used to send service query requests in a time-division manner within the same time window. In other words, "simultaneous transmission" in this example can be understood as the electronic device needing to simultaneously broadcast messages using multiple different communication technologies within a time window.

[0016] For example, the first electronic device has a variety of different communication technology capabilities, including multiple capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, and Cellular.

[0017] For example, the first electronic device and the second electronic device include, but are not limited to, smart TVs, large-screen devices, mobile phones, tablets, laptops, large-screen TVs, smart home devices, PDAs, in-vehicle computers, etc.

[0018] In one possible implementation of the first or second aspect, the first message indicates the communication technology capabilities of the first electronic device or indicates the communication technology used by the first electronic device to broadcast the message. In this implementation, the second electronic device can learn about the communication technology capabilities of the first electronic device, thereby facilitating the establishment of a communication connection between the second and first electronic devices based on these capabilities, and improving the efficiency of establishing a communication connection.

[0019] For example, the communication technology capabilities of the first electronic device include multiple capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, and Cellular.

[0020] In one possible implementation of either the first or second aspect, both the first message and the second message include a first random code from the first electronic device. This first random code is randomly generated by the first electronic device. The first electronic device can generate different first random codes at different times, and this first random code is used to uniquely identify the first electronic device. In this implementation, using the same random code carried in different messages to identify that both the first and second messages originate from the first electronic device is easy to implement, saves communication resources, and has high accuracy.

[0021] In one possible implementation of the first or second aspect, the response information includes: a second random code of the second electronic device and indication information indicating the communication technology capabilities of the second electronic device. The random code is randomly generated by the second electronic device. The second electronic device can generate different random codes at different times, and these random codes are used to uniquely identify the second electronic device. In this implementation, the first electronic device can learn about the communication technology capabilities of the second electronic device, thereby facilitating the establishment of a communication connection between the first and second electronic devices based on these capabilities, improving the efficiency of establishing a communication connection. Furthermore, using the same random code carried in different messages to identify that both the first and second messages originate from the first electronic device is easy to implement, saves communication resources, and has high accuracy.

[0022] In one possible implementation of the first or second aspect, before the first electronic device establishes a communication connection with the second electronic device based on the communication technology capabilities supported by the second electronic device, the method further includes: the first electronic device determining, based on a second random code, that the response information originates from the second electronic device; and the first electronic device obtaining the network identification information of the second electronic device based on the response information, wherein the network identification information of the second electronic device includes the MAC address or IP address of the second electronic device. In this implementation, the network identification information of the second electronic device is used to identify the second electronic device. This network identification information is changeable and can be dynamically expanded and updated according to changes in the capabilities supported by the second electronic device. Therefore, the network identification information of the second electronic device can be dynamically expanded. Using the network identification information of the second electronic device to identify the device can effectively prevent the device ID information from being tracked, solving the problem of easy tracking when using a unique device ID to identify a device in the prior art, and improving device security.

[0023] For example, the network identification information of the second electronic device includes: BT MAC, Wi-Fi MAC, USB MAC, and IP. That is, the network identification information of the second electronic device includes four parameters of the second electronic device, namely: the BT MAC address of the second electronic device, the Wi-Fi MAC address of the second electronic device, the USB MAC address of the second electronic device, and the IP address of the second electronic device.

[0024] For example, the response information received by the first electronic device from the second electronic device can be one or more, and the different response information is broadcast or sent by the second electronic device using different communication technologies.

[0025] In one possible implementation of the first or second aspect, after the first electronic device receives the response information sent by the second electronic device, the method further includes: the first electronic device receiving first information sent by the second electronic device, the first information including the network identifier of the second electronic device; the first electronic device determining that the first information originates from the second electronic device based on the network identifier information of the second electronic device and the network identifier of the second electronic device carried in the first information. In this implementation, the first electronic device determines that the first information was sent by the second electronic device by comparing the first information including the network identifier of the second electronic device with the previously stored network identifier information of the second electronic device, i.e., performing deduplication processing of the device. Furthermore, the content of multiple messages sent by the second electronic device can be filtered and shared, which can avoid multiple interactions between the first and second electronic devices, thereby saving signaling overhead and improving resource utilization.

[0026] In one possible implementation of the first or second aspect, the first electronic device establishes a communication connection with the second electronic device based on the communication technology capabilities supported by the second electronic device. This includes: the first electronic device determining a set of communication technology capabilities supported by both the first and second electronic devices based on the communication technology capabilities supported by the second electronic device; the first electronic device sending a connection request to the second electronic device based on the service to be transmitted within the set of communication technology capabilities, the connection request including connection information corresponding to one or more communication technologies; and the first electronic device establishing a communication connection with the second electronic device using the one or more communication technologies. In this implementation, the first electronic device can utilize one or more communication technologies to establish a communication connection with the second electronic device, improving communication connection efficiency and meeting the requirements of different service transmissions.

[0027] For example, the connection request includes standard request information defined in the protocol corresponding to the optimal one or more connection methods (such as Wi-Fi, Bluetooth, etc.), such as connection address, connection window, security requirements, etc.

[0028] For example, the first electronic device can predefine a connection strategy. For high-bandwidth services, during near-field transmission, different capabilities are prioritized from highest to lowest. During far-field transmission, different capabilities (i.e., technologies) are prioritized from highest to lowest. When the first electronic device and the second electronic device connect, the first electronic device can select the highest priority method from among the capabilities supported by both devices to connect to the large-screen device, based on the aforementioned priority of different capabilities. Alternatively, it can select several high-priority methods to connect to the second electronic device.

[0029] In one possible implementation of either the first or second aspect, as multiple service transmissions occur between the first and second electronic devices, the first electronic device can monitor information such as communication latency and bandwidth during each connection process, dynamically adjusting the method for establishing subsequent connections with the second electronic device and dynamically adjusting the priority order of various capabilities. This further improves the efficiency of communication connections.

[0030] In one possible implementation of the first or second aspect, the first electronic device sends the data of the service to be transmitted to the second electronic device through one or more communication technologies with which a communication connection has already been established. In this implementation, when multiple connections exist simultaneously between the first and second electronic devices, the first electronic device can select the optimal one, or simultaneously select multiple of them to transmit data to the second electronic device, thereby improving the efficiency of data transmission between the first and second electronic devices and further enhancing the user experience.

[0031] Thirdly, a method for discovering and connecting electronic devices is provided, the method comprising: a second electronic device receiving, during a first time period, a first message broadcast by a first electronic device using a first communication technology, the first message being used to query the communication technology capabilities of other devices; the second electronic device receiving, during a second time period, a second message broadcast by the first electronic device using a second communication technology, the second message being used to query the communication technology capabilities of other devices, the first time period and the second time period overlapping; the second electronic device sending response information to the first electronic device based on the first message and the second message; the second electronic device receiving a connection request sent by the first electronic device; and the second electronic device establishing a communication connection with the first electronic device based on the connection request.

[0032] The third aspect provides a method for discovering and connecting electronic devices. The first electronic device uses multiple communication technologies to broadcast messages separately during overlapping time periods. That is, the time periods for broadcasting messages using multiple different communication technologies overlap in the time domain (partial or complete overlap). This method utilizes all the device discovery technologies (capabilities) possessed by the same electronic device, or multiple technologies (capabilities) from all discovery devices, to simultaneously send (broadcast) messages. This satisfies the requirements of service providers in heterogeneous network conditions for discovering and connecting devices with multiple different technical capabilities. It can proactively discover more devices supporting distributed capabilities, achieving the integration of multiple discovery and connection technologies, improving the efficiency of discovering and connecting electronic devices, and enhancing the user experience.

[0033] In one possible implementation of the third aspect, the method further includes: the second electronic device receiving a third message broadcast by the first electronic device using a third communication technology during a third time period. This third message is used to query the communication technology capabilities of other devices. The third communication technology conflicts with the first communication technology; the first and third time periods do not overlap in the time domain; and the second and third time periods overlap. In this implementation, when the first electronic device simultaneously broadcasts messages using conflicting communication technologies (e.g., conflicts in channel or air interface timing), the time periods for sending service query requests using these conflicting technologies do not overlap in the time domain, while the time periods for broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain (partially or completely). This allows for the simultaneous transmission (broadcasting) of messages using all the device discovery technologies (capabilities) of the same electronic device or multiple technologies (capabilities) from all device discovery technologies (capabilities), satisfying the requirements of service services for discovering and connecting devices with multiple different technical capabilities under heterogeneous network conditions, and improving user experience.

[0034] Fourthly, a method for discovering and connecting electronic devices is provided, the method comprising: a second electronic device receiving, within a first time window, a first message broadcast by a first electronic device using a first communication technology, the first message being used to query the communication technology capabilities of other devices; the second electronic device receiving, within the first time window, a second message broadcast by the first electronic device using a second communication technology; the second electronic device sending response information to the first electronic device based on the first message and the second message; the second electronic device receiving a connection request sent by the first electronic device; and the second electronic device establishing a communication connection with the first electronic device based on the connection request.

[0035] The fourth aspect provides a method for discovering and connecting electronic devices. The first electronic device utilizes multiple communication technologies to simultaneously send messages within the same time window. This enables the simultaneous transmission (broadcasting) of messages using all the device discovery technologies (capabilities) of a single electronic device, or multiple technologies (capabilities) from all discovery devices. This meets the requirements of service providers in heterogeneous network conditions for discovering and connecting devices with various technical capabilities. It can proactively discover more devices supporting distributed capabilities, achieving the integration of multiple discovery and connection technologies, improving the efficiency of discovering and connecting electronic devices, and enhancing the user experience.

[0036] In one possible implementation of the fourth aspect, the method further includes: the second electronic device receiving a third message broadcast by the first electronic device using a third communication technology within the first time window; the third message being used to query the communication technology capabilities of other devices; wherein the third communication technology conflicts with the first communication technology. In this implementation, the first electronic device simultaneously broadcasts messages using multiple non-conflicting communication technologies within the time window (i.e., the time periods for broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain, which can be partial or complete overlap). Within the time window, the first electronic device simultaneously broadcasts messages using another communication technology. If the other communication technology conflicts with one of the communication technologies used to broadcast messages within the time window, then the conflicting communication technologies are used to send the broadcast messages in a time-division manner within the time window. This satisfies the requirement for service discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, improving user experience.

[0037] For example, the various communication technology capabilities of the first or second electronic device include multiple capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, and Cellular.

[0038] For example, the first electronic device and the second electronic device include, but are not limited to, smart TVs, large-screen devices, mobile phones, tablets, laptops, large-screen TVs, smart home devices, PDAs, in-vehicle computers, etc.

[0039] In one possible implementation of the third or fourth aspect, the first message indicates the communication technology capabilities of the first electronic device or indicates the communication technology used by the first electronic device to broadcast the message. In this implementation, the second electronic device can learn about the communication technology capabilities of the first electronic device, thereby facilitating the establishment of a communication connection between the second and first electronic devices based on these capabilities, and improving the efficiency of establishing a communication connection.

[0040] In one possible implementation of the third or fourth aspect, both the first message and the second message include a first random code from the first electronic device. This random code is randomly generated by the first electronic device. The first electronic device can generate different random codes at different times, and this random code is used to uniquely identify the first electronic device. In this implementation, using the same random code carried in different messages to identify that both the first and second messages originate from the first electronic device is easy to implement, saves communication resources, and has high accuracy.

[0041] In a possible implementation of the third or fourth aspect, before the second electronic device establishes a communication connection with the first electronic device according to the connection request, the method further includes: the second electronic device determining, based on a first random code, that both the first message and the second message originate from the first electronic device; and the second electronic device obtaining network identification information of the first electronic device based on the first message and the second message, wherein the network identification information of the first electronic device includes the MAC address or IP address of the first electronic device. In this implementation, the network identification information of the first electronic device is used to identify the first electronic device. This network identification information is changeable and can be dynamically expanded and updated according to changes in the capabilities supported by the first electronic device. Therefore, the network identification information of the first electronic device is dynamically expandable. Using the network identification information of the first electronic device to identify the device can effectively prevent the device ID information from being tracked, solving the problem of easy tracking when using a unique device ID to identify a device in the prior art, and improving device security.

[0042] For example, the network identification information of the first electronic device includes: BT MAC, Wi-Fi MAC, NFC MAC, USB MAC, and IP. That is, the network identification information of the first electronic device includes five parameters of the first electronic device, namely: the BT MAC address of the first electronic device, the Wi-Fi MAC address of the first electronic device, the NFC MAC address of the first electronic device, the USB MAC address of the first electronic device, and the IP address of the first electronic device.

[0043] In one possible implementation of the third or fourth aspect, after the second electronic device receives the first message and the second message, the method further includes: the second electronic device receiving second information sent by the first electronic device, the second information including the network identifier of the first electronic device; the second electronic device determining that the second information originates from the first electronic device based on the network identifier information of the first electronic device and the network identifier of the first electronic device carried in the second information. In this implementation, the second electronic device determines that the second information was sent by the first electronic device by comparing the second information including the network identifier of the first electronic device with the previously stored network identifier information of the first electronic device, thus performing deduplication processing. Furthermore, the content of multiple messages sent by the first electronic device can be filtered and shared, which can avoid multiple interactions between the first and second electronic devices, thereby saving signaling overhead and improving resource utilization.

[0044] In one possible implementation of the third or fourth aspect, the second electronic device sends response information to the first electronic device based on the first message and the second message, including: the second electronic device sending the first response information to the first electronic device using a fourth communication technology during a fourth time period; and the second electronic device sending the second response information to the first electronic device using a fifth communication technology during a fifth time period, wherein the fourth and fifth time periods overlap. In this implementation, the second electronic device broadcasts messages using multiple communication technologies during the overlapping time periods, that is, it sends response information (broadcast messages) to the first electronic device using multiple different communication technologies. The time periods for sending multiple response messages overlap in the time domain (partial or complete overlap). This utilizes all the device discovery technologies (capabilities) possessed by the same electronic device, or multiple technologies (capabilities) from all device discovery technologies (capabilities) to simultaneously send messages, satisfying the requirements of service services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions. This achieves the integration of multiple discovery and connection technologies, improves the efficiency of discovering and connecting electronic devices, and enhances the user experience.

[0045] In one possible implementation of the third or fourth aspect, the method further includes: the second electronic device sending a third response message to the first electronic device using a sixth communication technology within a sixth time period; wherein the sixth communication technology conflicts with the fourth communication technology, the fourth time period and the sixth time period do not overlap in the time domain, and the fifth time period overlaps with the sixth time period. In this implementation, when the second electronic device simultaneously sends response messages (broadcast messages) using conflicting communication technologies (e.g., conflicts in channel, air interface timing, etc.), the time periods for sending messages using conflicting communication technologies do not overlap in the time domain, while the time periods for sending messages using multiple non-conflicting communication technologies overlap in the time domain (partial or complete overlap). This achieves simultaneous message sending using all the device discovery technologies (capabilities) of the same electronic device or multiple technologies (capabilities) of all device discovery technologies (capabilities), meeting the requirements of service services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and improving user experience.

[0046] In one possible implementation of the third or fourth aspect, the second electronic device sends response information to the first electronic device based on the first message and the second message, including: the second electronic device sending the first response information to the first electronic device using a fourth communication technology within a second time window; and the first electronic device sending the second response information to the first electronic device using a fifth communication technology within the second time window. In this implementation, the second electronic device utilizes multiple communication technologies to simultaneously send messages using these different communication technologies within the same time window. This achieves simultaneous message sending using all the device discovery technologies (capabilities) possessed by the same electronic device, or multiple technologies (capabilities) from all device discovery technologies (capabilities), meeting the requirements of service services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions. It achieves the integration of multiple discovery and connection technologies, improving the efficiency of discovering and connecting electronic devices and enhancing the user experience.

[0047] In one possible implementation of the third or fourth aspect, the response information includes: a second random code of the second electronic device and indication information for indicating the communication technology capabilities of the second electronic device. In this implementation, the second random code is randomly generated by the second electronic device. The second electronic device can generate different second random codes at different times, and these second random codes are used to uniquely identify the second electronic device. Using the same random code carried by different response information to identify that both the first and second response information originate from the second electronic device is easy to implement, saves communication resources, and is highly accurate. Furthermore, it allows the first electronic device to know the communication technology capabilities of the second electronic device, thereby facilitating the establishment of a communication connection between the first and second electronic devices based on these capabilities, improving the efficiency of establishing a communication connection.

[0048] In one possible implementation of the third or fourth aspect, the connection request includes one or more communication technologies corresponding to connection information. In this implementation, the first electronic device can utilize one or more communication technologies to establish a communication connection with the second electronic device, thereby improving communication connection efficiency and meeting the requirements of different service transmissions.

[0049] For example, the connection request includes standard request information defined in the protocol corresponding to the optimal one or more connection methods (such as Wi-Fi, Bluetooth, etc.), such as connection address, connection window, security requirements, etc.

[0050] In one possible implementation of the third or fourth aspect, the method further includes: the second electronic device receiving data for a service to be transmitted sent by the first electronic device through one or more communication technologies with an established communication connection. In this implementation, when multiple connections exist simultaneously between the first and second electronic devices, the first electronic device can select the optimal one, or simultaneously select multiple of them to transmit data to the second electronic device, thereby improving the efficiency of data transmission between the first and second electronic devices and further enhancing the user experience.

[0051] Fifthly, an electronic device is provided, comprising: a unit for performing the steps of the first aspect or any possible implementation of the first aspect, or a unit for performing the steps of the second aspect or any possible implementation of the second aspect.

[0052] A sixth aspect provides an electronic device comprising: a unit for performing the steps of the third aspect or any possible implementation of the third aspect, or a unit for performing the steps of the fourth aspect or any possible implementation of the fourth aspect.

[0053] In a seventh aspect, an electronic device is provided, comprising at least one processor and a memory, wherein the at least one processor is configured to execute: the method of the first aspect or any possible implementation thereof, or the method of the second aspect or any possible implementation thereof.

[0054] Eighthly, an electronic device is provided, comprising at least one processor and a memory, wherein the at least one processor is configured to execute: the method of the third aspect or any possible implementation thereof, or the method of the fourth aspect or any possible implementation thereof.

[0055] Ninth aspect, an electronic device is provided, the electronic device including at least one processor and interface circuitry, the at least one processor being configured to execute: the method of the first aspect or any possible implementation of the first aspect above, or the method of the second aspect or any possible implementation of the second aspect above.

[0056] In a tenth aspect, an electronic device is provided, comprising at least one processor and interface circuitry, wherein the at least one processor is configured to execute: the method of the third aspect or any three possible implementations of the third aspect above, or the method of the fourth aspect or any one possible implementation of the fourth aspect above.

[0057] Eleventhly, a communication device is provided, which includes any of the electronic devices provided in the fifth, seventh, or ninth aspects described above.

[0058] In a twelfth aspect, a communication device is provided, which includes any of the electronic devices provided in the sixth, eighth, or tenth aspects described above.

[0059] In a thirteenth aspect, a communication system is provided, comprising: any one of the electronic devices provided in the fifth, seventh, ninth, or eleventh aspects above, and any one of the electronic devices provided in the sixth, eighth, tenth, or twelfth aspects above.

[0060] In a fourteenth aspect, a computer program product is provided, comprising a computer program that, when executed by a processor, is used to perform a method of any one of the first to fourth aspects, or to perform a method of any possible implementation of any one of the first to fourth aspects.

[0061] In a fifteenth aspect, a computer-readable storage medium is provided, which stores a computer program that, when executed, performs a method of any one of the first to fourth aspects, or performs a method of any possible implementation of any one of the first to fourth aspects.

[0062] In a sixteenth aspect, a chip is provided, comprising: a processor for calling and running a computer program from a memory, such that a communication device having the chip mounted performs a method of any one of the first to fourth aspects, or performs a method of any possible implementation of any one of the first to fourth aspects.

[0063] The method and electronic device for discovering and connecting electronic devices provided in this application utilize all device discovery technologies (capabilities) of the same electronic device, or multiple technologies (capabilities) of all device discovery devices, to simultaneously broadcast or send messages. This satisfies the requirements of business services for discovering and connecting devices with various technical capabilities under heterogeneous network conditions, allowing multiple discovery and connection technologies to be used in parallel, improving device discovery efficiency and enhancing user experience. Furthermore, using the device's network identification information to identify a device avoids the problem of easy tracking when using unique device IDs, which is commonly used in the industry. This effectively prevents device ID information from being tracked, improving device security, and also ensures that the network identification information changes dynamically when device capabilities change. Further, using the device's network identification information for device deduplication filters out duplicate information. Moreover, when connecting devices, the supported capabilities of the peer device can be obtained, allowing the selection of the optimal connection technology and capabilities based on business needs and scenarios, thus improving user experience. Attached Figure Description

[0064] Figure 1 This is a schematic diagram illustrating an application scenario applicable to the embodiments of this application.

[0065] Figure 2 This is a schematic diagram illustrating another application scenario applicable to the embodiments of this application.

[0066] Figure 3 This is a schematic diagram of the system architecture of an example electronic device provided in this application.

[0067] Figure 4 This is a schematic diagram illustrating the process by which a discovery device discovers surrounding devices through an active discovery method, as provided in this application.

[0068] Figure 5 This is a schematic diagram illustrating the process by which a discovery device discovers surrounding devices through a passive discovery method, as provided in this application.

[0069] Figure 6 This is a schematic flowchart illustrating a method for discovering and connecting electronic devices provided in an embodiment of this application.

[0070] Figure 7 This is a schematic user interface diagram illustrating a user triggering a smartphone to actively discover surrounding devices, provided in an embodiment of this application.

[0071] Figure 8 This is another illustrative user interface diagram provided in this application embodiment, illustrating how a user triggers a smartphone to actively discover surrounding devices.

[0072] Figure 9This is a schematic diagram illustrating an example of BLE and Wi-Fi (2.4GHz) broadcasting service query requests in different time slots, as provided in an embodiment of this application.

[0073] Figure 10 This is a schematic flowchart illustrating another method for discovering and connecting electronic devices provided in the embodiments of this application.

[0074] Figure 11 This is a schematic block diagram of an example electronic device structure provided in the embodiments of this application. Detailed Implementation

[0075] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0076] In the description of the embodiments of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0077] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0078] Furthermore, various aspects or features of this application can be implemented as methods, apparatus, or articles of manufacture using standard programming and / or engineering techniques. The term "article of manufacture" as used herein encompasses a computer program accessible from any computer-readable device, carrier, or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). Additionally, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.

[0079] The electronic devices in this application embodiment can refer to user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device. Terminal equipment can also be cellular phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDAs), handheld devices with wireless or wired communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, wearable devices, terminal equipment in 5G networks, or terminal equipment in future evolved public land mobile networks (PLMNs), etc. For example, the terminal equipment can be a smart TV, large-screen device, smart screen, smartphone, smart speaker, laptop, tablet, in-vehicle telematics unit (T-BOX), in-vehicle equipment, etc. This application embodiment does not limit this.

[0080] Furthermore, various aspects or features of this application can be implemented as methods, apparatus, or articles of manufacture using standard programming and / or engineering techniques. The term "article of manufacture" as used herein encompasses a computer program accessible from any computer-readable device, carrier, or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). Additionally, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.

[0081] Wireless communication networks involve various wireless and wired technologies, such as Bluetooth (BT), Wi-Fi, NFC, Zigbee, USB, and cellular communication. Currently, different types of terminal devices can communicate using various wireless or wired technologies. Due to differences in device capabilities (e.g., memory size, power consumption) and the capabilities of different wireless technologies (e.g., transmission distance, bandwidth), different devices (e.g., large-screen devices, in-vehicle systems, speakers, watches, smart switches, etc.) often employ different technologies for connection and communication with other devices.

[0082] For example, an electronic device can communicate with other devices using out-of-band (OOB) data. OOB is a standard processing method that essentially involves first using a first-level discovery technology to discover devices, exchanging connection information using a second-level technology during the discovery process, and finally establishing a connection and transmitting data via the second-level technology. For instance, one device discovers another via NFC touch. During this NFC discovery process, the two devices exchange Bluetooth connection information, and finally establish a connection and transmit data via Bluetooth. This effectively reduces the discovery latency of Bluetooth technology and uses NFC touch instead of Bluetooth scanning to discover devices, improving user convenience.

[0083] However, when using the OOB (Out-of-Band) approach to discover devices, it actually only employs one technical means. In other words, when one device discovers another, even if that device has the capability of multiple wireless technologies, it can only use one of those technologies to discover the other device. This fails to meet the needs of services in heterogeneous network architectures for devices with multiple wireless technology capabilities, resulting in a poor user experience.

[0084] When a device possesses capabilities in multiple wireless and wired technologies, another method exists for discovering and connecting between two devices. This method prioritizes the various wireless or wired technologies the device possesses, first using the highest-priority technology to scan for a period. After the scan period, the lower-priority technology is activated for another period. Once other devices are detected, the connection process is initiated. However, this method still relies on a single technology for device discovery and cannot meet the needs of heterogeneous network architectures where services require devices with multiple wireless technology capabilities, resulting in a poor user experience.

[0085] In view of this, this application provides a method for discovering and connecting electronic devices, which utilizes all the device discovery technologies (capabilities) of the same electronic device or multiple technologies (capabilities) of all device discovery devices simultaneously to discover another device, and selects the optimal one or more technologies for device connection and data transmission according to different business needs and network environment, thereby realizing the integration of multiple discovery and connection technologies, meeting the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and improving user experience.

[0086] Figure 1 This is a schematic diagram illustrating an application scenario applicable to an embodiment of this application. Figure 1 The image shown is a schematic diagram of a family scene, such as... Figure 1 The scenario shown includes a first electronic device and a second electronic device. Figure 1 In this application, the first electronic device is a user-used smartphone 110, and the second electronic device is a large-screen device 120 in a home. The smartphone 110 supports multiple technologies or capabilities for discovering devices, such as BitTorrent, Wi-Fi, NFC, Zigbee, USB, and Cellular. The large-screen device 120 also supports multiple technologies, including BitTorrent, Wi-Fi, NFC, USB, and Cellular. When a user discovers and connects to the large-screen device 120 using the smartphone 110, the method for discovering and connecting electronic devices provided in this application can be used. The smartphone 110 can simultaneously discover the large-screen device 120 using technologies such as BitTorrent, Wi-Fi, NFC, Zigbee, USB, and Cellular, and select the optimal technology for device connection and data transmission based on service requirements or network environment.

[0087] It should be understood that Figure 1 This is merely an example and should not impose any limitation on the application scenarios applicable to the embodiments of this application. For example, in Figure 1 The application scenarios shown can also include other home devices, such as personal computers and tablets. When a user discovers and connects to these devices using their smartphone 110, the method for discovering and connecting electronic devices provided in this application can also be used.

[0088] Figure 2 This is a schematic diagram illustrating another application scenario applicable to embodiments of this application. Figure 2 The diagram shown is a schematic representation of a vehicle-to-everything (V2X) scenario. Figure 2 The scenario shown includes a first electronic device and a second electronic device. Figure 2In this embodiment, the first electronic device is exemplified by a user using a smartphone 210, and the second electronic device is exemplified by an in-vehicle device 220. The in-vehicle device 220 may include an electronic control unit (ECU), a vehicle computer, an in-vehicle computer, or an in-vehicle T-BOX, etc., and this embodiment does not impose limitations. The smartphone 210 can support multiple technologies or capabilities for discovering devices. For example, the smartphone 210 can support multiple capabilities such as BitTorrent, Wi-Fi, NFC, Zigbee, USB, and Cellular. The in-vehicle device 220 supports multiple capabilities such as BitTorrent, Wi-Fi, NFC, USB, and Cellular. When a user discovers and connects to the in-vehicle device 220 using the smartphone 210, the method for discovering and connecting electronic devices provided in this application can be used. The smartphone 210 can simultaneously discover the in-vehicle device 220 using technologies such as BitTorrent, Wi-Fi, NFC, Zigbee, USB, and Cellular, and select the optimal technology for device connection and data transmission based on service or network environment.

[0089] It should be understood that Figure 2 This is merely an example and should not impose any limitation on the application scenarios applicable to the embodiments of this application. For example, in Figure 2 The application scenarios shown may also include other in-vehicle devices and user devices. This application does not impose any limitations on the embodiments described herein.

[0090] It should also be understood that, in the embodiments of this application, BT may include classic Bluetooth and Bluetooth Low Energy (BLE) Bluetooth. Classic Bluetooth includes at least one of two types of Bluetooth: Bluetooth Basic Rate (BR) and Bluetooth Enhanced Data Rate (EDR).

[0091] It should also be understood that Figure 1 and Figure 2 The methods for discovering and connecting electronic devices provided in this application are merely illustrative of the application scenarios of the embodiments of this application. They can also be applied to other scenarios, and the embodiments of this application are not limited here.

[0092] Figure 3 The diagram shown is a schematic representation of the system architecture of the electronic device provided in this application. Figure 3As shown, the system architecture mainly includes a discovery module and a connectivity module. The discovery module may include: a device discovery module and / or a module for discovering devices, a plugin management module for discovering connectivity capabilities (Discover Ability Plugin Mgmt), a discovery connectivity policy management module (Discover Strategy), a network service discovery management module (NsdDiscover Mgmt), a USB discovery management module (USb Discover Mgmt), a BT discovery management module (BTDiscover Mgmt), a Wi-Fi discovery management module (Wi-Fi Discover Mgmt), and other discovery method management modules. The connectivity module includes: a connection manager module (Connect Manager), a link state machine module (Link State Machine), a USB link module (USBChannel), a BT link module (BT Channel), a Wi-Fi link module (Wi-Fi Channel), and other link modules.

[0093] It should be understood that, in the embodiments of this application, the system architecture of the electronic device may include Figure 3 The two modules shown, "discovery device module" and "discovered device module," can also include either one. If the electronic device includes both modules, it can have both active and passive discovery capabilities; that is, it can be either a discovery device or a discovery device. If the electronic device includes a discovery device module but not a discovery device module, it has active discovery capabilities but not passive discovery capabilities; that is, it is a discovery device. If the electronic device includes a discovery device but not a discovery device module, it can have passive discovery capabilities but not active discovery capabilities; that is, it is a discovery device.

[0094] The Discover Device module includes two discovery modes: active mode and passive mode. The Discoverable Device module also includes two discovery modes: active mode and passive mode.

[0095] Among them, the discovery device module is mainly responsible for managing the capabilities of the discovery device. The discovery device module is responsible for managing various capabilities (such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) on the discovery connection capability plug-in management module; and scheduling the underlying BT, Wi-Fi, NFC, Zigbee, USB, Cellular or other discovery capabilities through the discovery connection policy management module.

[0096] The Discovery Device Module functions similarly to the Discovery Device Module, primarily responsible for the capabilities of the discovered device.

[0097] The plug-in management module for discovering connectivity capabilities is responsible for the registration and management of various capabilities on the device (such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.).

[0098] The Discovery Connectivity Policy Management module is responsible for coordinating and scheduling various capabilities (i.e., various connectivity technologies) on the device.

[0099] The connection management module and connection state machine module are responsible for negotiating and making recommendations for the connection of various capabilities (i.e., various connection technologies).

[0100] The discovery and management modules for various connectivity technologies, as well as the link module, are responsible for discovering specific connectivity technologies (such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) and implementing connectivity behaviors.

[0101] It should be understood that Figure 3 This is merely an example and should not impose any limitations on the system architecture of the electronic device in this application. For example, in other embodiments of this application, the system architecture of the electronic device may also adopt a similar approach. Figure 3 The examples shown may include different modules, more or fewer modules, or combinations of multiple different module methods. This application's embodiments are not limited to these examples.

[0102] The following describes the discovery device and the discovery terminal device in the embodiments of this application.

[0103] The discovery device can discover nearby devices with one or more services or capabilities by broadcasting messages to other nearby devices or listening to messages broadcast by other devices, and prompt the user to select a device or service to connect to. In addition, the discovery device will actively initiate a connection request.

[0104] In other words, the discovery device can obtain the services or capabilities supported by surrounding devices through active broadcasting or passive listening, and is the initiator of connection actions with other devices.

[0105] In this application embodiment, the capabilities of a peripheral device can be understood as the various wireless and wired connection technologies possessed by the peripheral device, including technologies or capabilities such as BitTorrent, Wi-Fi, NFC, Zigbee, USB, and Cellular. The services of a peripheral device can be understood as various services or businesses based on the capabilities supported by the device, such as file sharing, printing, and screen mirroring.

[0106] Discovered devices can announce their capabilities and services to surrounding devices by replying to broadcast messages from discovering devices or by engaging in feedback listening, making their capabilities and services known to surrounding devices. Feedback listening (or passive listening feedback) can be understood as follows: the discovering device (i.e., the listening device) subscribes to (or listens to) information published by the discovered device (i.e., the monitored device), and the discovered device actively broadcasts messages to enable the discovering device to listen. The discovered device will receive connection requests from other discovering devices and then perform binding authentication or an authentication process.

[0107] In other words, the discovered device will notify surrounding devices of its own services or capabilities through active broadcasting or passive listening feedback, and the discovered device is the receiver of connection actions between other devices.

[0108] The active discovery method and the passive discovery method in the embodiments of this application are described below.

[0109] Active discovery method: Active discovery is when the discovering device actively broadcasts a service query request to surrounding devices, and then waits for the discovered device to reply with the service information or capability information it has. After receiving the service information or capability information from the discovered device, it provides it to the upper-layer caller for invocation.

[0110] The service query request actively broadcast by the discovering device can carry conditions that the discovering device expects the discovered device to meet, such as: device name, device type, device capabilities (e.g., whether it includes audio and video capabilities), service information (e.g., whether it supports screen mirroring, printing, etc.). The service information carried in this service query request is mainly for the discovered device to match the expected service capabilities. For example, this service information may include: service name, service ID, service attributes, etc.

[0111] Optionally, the service query request may also carry the capability information of the discovery device itself (such as device name, device type, device capabilities, or service capabilities), with the aim of optimizing the discovery process and reducing subsequent interaction steps in the discovery process.

[0112] For example, Figure 4The diagram shown illustrates an example of a discovery device actively discovering surrounding devices, as provided in this application. Figure 4 In the example shown, the discovering device is device A, and the discovered devices include device B, device C, device D, and device X.

[0113] like Figure 4 As shown, device A simultaneously broadcasts a service query request to devices B, C, D, and X. This service query request includes information about the capabilities and / or services that the target devices need to support. For example, the capabilities the target devices need to support may include one or more of the following: BitTorrent, Wi-Fi, NFC, Zigbee, USB, and Cellular. The services the target devices need to support may include one or more of the following: file sharing, screen mirroring, and printing. Optionally, the service query request may also include device A's own capability information.

[0114] After devices B, C, D, and X each receive a broadcast service query request, device B determines whether it meets device A's broadcast requirements based on the service query request. For example, it determines whether device B supports the capabilities and services requested in the service query request. If device B supports them, it replies to device A with a message that includes the capabilities and services that device B supports.

[0115] Similarly, based on the service query request, device C determines whether it meets device A's broadcast requirements. For example, it determines whether device C supports the capabilities and services requested in the service query request. If device C does not support them, it will not reply to device A.

[0116] Based on the service query request, device D determines whether it meets device A's broadcast requirements. For example, it determines whether device D supports the capabilities and services requested in the service query request. If device D supports them, it replies to device A with a message that includes the capabilities and services that device D supports.

[0117] Based on the service query request, device X determines whether it meets device A's broadcast requirements. For example, it determines whether device X supports the capabilities and services requested in the service query request. If device X does not support them, it will not reply to device A.

[0118] Passive discovery method: Passive discovery is when the discovering device passively subscribes to the service or capability information published by surrounding devices, and then listens for the capability or service information actively broadcast by the discovered device.

[0119] For example, Figure 5The diagram shown illustrates an example of a discovery device discovering peripheral devices using a passive discovery method, as provided in this application. Figure 5 In the example shown, the discovering device is device A, and the discovered devices include device B, device C, device D, and device X.

[0120] First, device A subscribes to the service or capability information published by devices B, C, D, and X, and then device A can initiate discovery listening. Devices B, C, D, and X broadcast their own capability and / or service information at different times. Device A can then listen to the capability and / or service information broadcast by devices B, C, D, and X, thereby acquiring or discovering the capability and / or service information of surrounding devices.

[0121] Optionally, the messages broadcast by devices B, C, D, and X may also carry information about their own capabilities.

[0122] The following is combined Figure 1 The scenario illustrated illustrates the method for discovering and connecting electronic devices provided in this application. Figure 1 In the scenario shown, it is assumed that the user's first electronic device (smartphone 110) has capabilities such as BitTorrent, Wi-Fi, NFC, USB, Zigbee, and Cellular. The Wi-Fi frequency can include both 2.4GHz and 5GHz, denoted as Wi-Fi (2.4GHz) and Wi-Fi (5GHz) respectively. The second electronic device in the home (large-screen device 120) also has BitTorrent, Wi-Fi, USB, NFC, and Cellular capabilities. Smartphone 110 discovers large-screen device 120 using an active discovery method. It is assumed that smartphone 110 and large-screen device 120 are already connected via USB. Figure 1 In the scenario shown, smartphones can be understood as discovery devices, and large-screen devices can be understood as discovery devices or scanning devices.

[0123] Figure 6 The image shown is in Figure 1 The illustrated scenario is a schematic flowchart of a method 300 for discovering and connecting electronic devices provided in this application. Figure 6 As shown, the method 300 includes: S301 to S310.

[0124] S301, the user triggers the smartphone to actively discover nearby devices. In this embodiment, the user can trigger the smartphone to actively discover nearby devices through the following two operation methods:

[0125] The first method: Suppose a user needs to transfer files from their smartphone to a large-screen device, such as... Figure 7 As shown in 'a', when a user opens the "File Manager" application on their smartphone, the interface displayed is as follows: Figure 7 As shown in b, the user selects the file they want to share (e.g., file 1), clicks "Share," and chooses the sharing method. The displayed interface is as follows. Figure 7 As shown in 'c', in this embodiment, the user can click the "Select All" button, meaning the user can simultaneously discover other devices using Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network. Optionally, the user can select any number of methods from Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network according to their needs. Assuming there is no USB connection between the smartphone and the large screen, the user can click the selection boxes under "Bluetooth," "Wi-Fi," "NFC," "Zigbee," and "Mobile Network" to select these discovery methods to simultaneously discover other devices. After the user clicks the "Select All" button, the smartphone will simultaneously discover other nearby devices using Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network. After scanning for nearby devices, the smartphone displays a list of scanned devices to the user, containing device identifiers for one or more devices. For example, the displayed device list can be as follows: Figure 7 As shown in d in the diagram. Users can select a device from the device list (e.g., a large-screen device) as needed. After the user selects a large-screen device, the smartphone and the large-screen device will automatically select the optimal connection method from those supported by both devices based on the data being transmitted and the network environment, thereby enabling file transfer.

[0126] The second approach: Assume the user's sole purpose is to connect their smartphone to a large-screen device for quick file transfer when data or files need to be shared. The user then... Figure 8 Click "Settings" on the interface shown in Figure 'a'. The displayed interface is as follows: Figure 8As shown in b, in this embodiment, the user can click the "Select All" button to simultaneously discover other devices using Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile networks. Optionally, the user can select any number of methods from Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile networks according to their needs. For example, assuming there is no USB connection between the smartphone and the large screen, the user can click the corresponding "Bluetooth," "Wi-Fi," "NFC," "Zigbee," and "Mobile Network" buttons to select these discovery methods to find other devices. After the user clicks the "Select All" button, the smartphone will simultaneously use Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile networks to discover other nearby devices. After scanning for surrounding devices, the smartphone displays a list of the scanned devices to the user, which contains device identifiers for one or more devices. For example, the displayed device list can be as follows: Figure 8 As shown in 'c'. Users can select a device from the device list (e.g., a large-screen device) as needed. After the user selects a large-screen device, the smartphone and the large-screen device will automatically select the optimal connection method from those supported by both devices based on the data being transmitted and the network environment, thus completing the connection between the smartphone and the large screen.

[0127] Optionally, in the embodiments of this application, in Figure 8 Following the device list shown in 'c', as in Figure 8 As shown in d, the smartphone can also display the connection technologies or capabilities supported by each device in the device list to the user. The connection technologies or capabilities supported by a device can be understood as one or more connection types supported by the device, and the user can view the connection technologies supported by each device.

[0128] Optionally, in the embodiments of this application, in Figure 7 After the interface shown in 'c', the smartphone can also display something like this. Figure 8 The display interface is shown as 'd' in the diagram. In other words, Figure 7 The interface shown by d in the figure can be derived from Figure 8 The interface shown in d is replaced.

[0129] It should be understood that, in addition to the two operation methods described above, users can also trigger smartphones to actively discover surrounding devices through other operation methods in this application embodiment, and this application embodiment does not impose any restrictions on this.

[0130] In S302, after receiving a user's trigger to actively discover nearby devices, the smartphone broadcasts or sends messages using all its capabilities (BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc.), or multiple capabilities simultaneously. In this embodiment, for example, the smartphone uses BT, Wi-Fi, NFC, USB, Zigbee, and mobile network capabilities simultaneously to broadcast or send service query requests (also called broadcast messages) to nearby devices. In other words, the smartphone broadcasts a service query request (referred to as the first service query request for distinction) to nearby devices via BT. The smartphone broadcasts six service query requests simultaneously to surrounding devices: a second service query request via Wi-Fi, a third service query request via USB, a fourth service query request via NFC, a fifth service query request via Zigbee, and a sixth service query request via cellular network.

[0131] Optionally, in this embodiment, these six service query requests can be used to query the capabilities of the surrounding device, or to query whether the surrounding device has certain specific capabilities. Furthermore, these six service query requests can also be used to query the service information of the surrounding device, or to query whether the surrounding device has certain specific service information, etc.

[0132] In this embodiment, six service query requests are sent simultaneously by the smartphone. In this embodiment, "simultaneous sending or simultaneous broadcasting" can be understood as the smartphone simultaneously sending or broadcasting service query requests using multiple non-conflicting communication technologies within a time window (i.e., the time periods for sending or broadcasting service query requests using multiple non-conflicting communication technologies overlap in the time domain, which can be partial or complete overlap; for example, multiple non-conflicting communication technologies can start sending or broadcasting service query requests simultaneously). Based on this, another communication technology is used simultaneously to send or broadcast service query requests within the same time window. If this other communication technology conflicts with one of the communication technologies used to send or broadcast service query requests within the same time window, then the conflicting communication technologies are used to send or broadcast service query requests at different times within the same time window. In other words, "simultaneous sending" in this example can be understood as the smartphone needing to use multiple different communication technologies simultaneously or at different times to send or broadcast service query requests within a time window.

[0133] Alternatively, in this embodiment, "simultaneous transmission or simultaneous broadcasting" can be understood as follows: A first service query request is transmitted or broadcast using a first communication technology during a first time period, and a second service query request is transmitted or broadcast using a second communication technology during a second time period. If the first and second communication technologies do not conflict (e.g., there are no conflicts in channel, air interface timing, etc.), then the first and second time periods may overlap in the time domain (partial or complete overlap). Based on this, a third service query request is transmitted or broadcast using a third communication technology during a third time period. If the third communication technology conflicts with the first or second communication technology (e.g., there are conflicts in channel, air interface timing, etc.), then the third and first time periods do not overlap in the time domain, or the third and second time periods do not overlap in the time domain. In other words, "simultaneous transmission" can be understood as: the time periods for transmitting or broadcasting service query requests using multiple non-conflicting communication technologies overlap in the time domain (partial or complete overlap), while the time periods for transmitting or broadcasting service query requests using conflicting communication technologies do not overlap in the time domain.

[0134] In this embodiment, the first service query request further includes: Wi-Fi capability indication information, NFC capability indication information, USB capability indication information, Zigbee capability indication information, and mobile network capability indication information. Specifically, the Wi-Fi capability indication information indicates that the smartphone also broadcast the service query request via Wi-Fi. The NFC capability indication information indicates that the smartphone also broadcast the service query request via NFC. The USB capability indication information indicates that the smartphone also sent the service query request via USB. The Zigbee capability indication information indicates that the smartphone also broadcast the service query request via Zigbee. The mobile network capability indication information indicates that the smartphone also broadcast the service query request via cellular network.

[0135] Optionally, the first service query request may also include: BT capability indication information, which indicates that the smartphone also broadcast the service query request using the BT method.

[0136] Similarly, each of the second service query requests carries indication information indicating that the smartphone has also utilized other capabilities of its to simultaneously broadcast or send the service query request.

[0137] In other words, the service query requests broadcast using different methods each carry an indication that the smartphone is simultaneously broadcasting or sending the service query request using all its other capabilities.

[0138] Optionally, in this embodiment, as another possible implementation, the BT capability indication information can also be used to indicate that the smartphone also has BT communication capability, the Wi-Fi capability indication information can also be used to indicate that the smartphone also has Wi-Fi communication capability, the NFC capability indication information can also be used to indicate that the smartphone also has NFC communication capability, the USB capability indication information can also be used to indicate that the smartphone also has USB communication capability, and the Zigbee capability indication information can also be used to indicate that the smartphone also has Zigbee communication capability. In other words, various capability indication information can also be used to indicate that the smartphone has a certain communication capability, but does not mean that the smartphone uses that communication capability to send or broadcast a service query request.

[0139] Optionally, in this embodiment, for example, if a user's smartphone supports Bluetooth communication capabilities, but the user has turned off Bluetooth on the smartphone, the smartphone will not be able to broadcast service query requests via Bluetooth. However, service query requests broadcast or sent using other communication technologies can carry Bluetooth capability indication information, which indicates that the smartphone has Bluetooth communication capabilities. Alternatively, service query requests broadcast or sent using other communication technologies may not carry Bluetooth capability indication information, i.e., the peer device will not know whether the smartphone supports Bluetooth communication capabilities.

[0140] Optionally, in this embodiment, besides notifying the large-screen device that the smartphone has also used other capabilities to broadcast or send service query requests to the large-screen device, or that the smartphone has other communication capabilities, other optional methods can also be used:

[0141] For example, one possible implementation is that the smartphone and the large-screen device pre-agree on rules. For instance, each query request could include a field (e.g., an indicator field) indicating whether the smartphone is using other capabilities to broadcast the service query request to the large-screen device, or whether the smartphone possesses other communication capabilities. For example, this field could be 6 bits long. The position of this field in each query request is fixed (e.g., the nth field in each service query request), and both the smartphone and the large-screen device are aware of the field's position and the meaning of each bit in that field beforehand.

[0142] For example, in a 6-bit field, the first bit indicates whether the smartphone broadcast the service query request using BitTorrent (BT). A value of 1 indicates that the smartphone broadcast the service query request using BT, and a value of 0 indicates that the smartphone did not. Similarly, the second bit indicates whether the smartphone broadcast the service query request using Wi-Fi. A value of 1 indicates that the smartphone broadcast the service query request using Wi-Fi, and a value of 0 indicates that the smartphone did not. The third bit indicates whether the smartphone broadcast the service query request using NFC. A value of 1 indicates that the smartphone broadcast the service query request using NFC, and a value of 0 indicates that the smartphone did not. The fourth bit indicates whether the smartphone sent the service query request using USB. A value of 1 indicates that the smartphone sent the service query request using USB, and a value of 0 indicates that the smartphone did not send the service query request using USB. The fifth bit indicates whether the smartphone broadcast the service query request using Zigbee. A value of 1 indicates that the smartphone broadcast the service query request using Zigbee, and a value of 0 indicates that the smartphone did not. The sixth bit indicates whether the smartphone broadcast the service query request using cellular methods. A value of 1 indicates that the smartphone broadcast the service query request using cellular methods, and a value of 0 indicates that the smartphone did not. The smartphone and the large-screen device negotiate the indication rules for this field in advance. Thus, this indication field can be used to indicate whether the smartphone simultaneously broadcasts service query requests using other capabilities it possesses.

[0143] For example, as another possible implementation, the smartphone and the large-screen device can pre-agree on a rule: using different special strings (e.g., a special string can be a specific sequence consisting of at least one of numbers, letters, or special characters) to represent different capabilities. These different special strings may or may not be present in each query request. For example, there could be six different special strings, representing BT, Wi-Fi, NFC, USB, Zigbee, and Cellular capabilities respectively. If a particular special string is present in a query request, it indicates that the smartphone is also using the capability corresponding to that special string to broadcast the service query request to the large-screen device, or that the smartphone also has the communication capability corresponding to that special string. If it is not present, it indicates that the smartphone is not using the capability corresponding to that special string to broadcast the service query request to the large-screen device, or that the smartphone does not have the communication capability corresponding to that special string. The smartphone and the large-screen device pre-agree on the indication rules for the different special strings. In this way, using these different special strings, it is possible to indicate whether the smartphone is using its other capabilities to broadcast the service query request, or whether the smartphone has other communication capabilities.

[0144] In this embodiment, each of the six service query requests also carries a random value (also called a random code). All six service query requests carry the same random value, which is randomly generated by the smartphone. It should be understood that the smartphone can generate different random values ​​at different times. This random value is used to uniquely identify the smartphone, that is, the random value is used to uniquely identify a device. The random values ​​carried in multiple service query requests sent in the same instance are the same, while the random values ​​carried in service query requests sent in different instances are different.

[0145] It should be understood that in the embodiments of this application, when a smartphone broadcasts or sends messages simultaneously using all its capabilities (BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc.), there may be conflicts in channels, air interface timing, etc., when broadcasting messages using multiple different technologies, since different capabilities or technologies have various corresponding protocol provisions. That is, there may be interference between messages broadcast using different technologies. Therefore, when a smartphone broadcasts messages simultaneously using BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc., the conflict avoidance mechanism described below can be adopted.

[0146] Table 1: Collision Table When Broadcasting Messages Simultaneously Using Different Technologies

[0147]

[0148] Table 1 shows the conflict scenarios when using different technologies to broadcast messages simultaneously. As shown in Table 1, "conflict" indicates that there is signal interference when using two different technologies to broadcast messages simultaneously (e.g., channel interference or air interface timing conflicts), requiring a time-division multiplexing strategy to use both technologies. "No conflict" indicates that there is no signal interference when using two different technologies to broadcast messages simultaneously, and both technologies can be used to broadcast messages simultaneously.

[0149] Specifically, since USB and NFC do not interfere with BT (using BLE as an example) and Wi-Fi respectively, USB and NFC can always be on for listening and scanning. This means that regardless of whether the smartphone uses other technologies to broadcast service query requests, it can simultaneously send and broadcast service query requests using both USB and NFC. However, due to 2.4GHz interference between BLE and Wi-Fi, when broadcasting using BLE and Wi-Fi (2.4GHz), a time-division multiplexing strategy is used to avoid air interface conflicts, broadcasting on a negotiated designated channel.

[0150] It should be understood that, in the embodiments of this application, the time-division strategy involves the control of specific channels at the chip level. Specifically, a parallel discovery approach is adopted for two or more non-conflicting technologies, that is, multiple non-conflicting technologies are used to broadcast discovery device messages simultaneously, while a time-division strategy is adopted for two or more conflicting technologies or channels, that is, discovery device messages are broadcast in a time-division manner on two or more conflicting technologies or channels.

[0151] In this embodiment, the time-sharing strategy first synchronizes the clock strategies of the smartphone and the large-screen device's multi-chips. Based on the synchronized clock strategies, it plans the broadcast window strategy for the smartphone's multi-chips and the scanning window strategy for the large-screen device's multi-chips, wherein the duration of the broadcast window is shorter than the duration of the scanning window. The discovering device (smartphone) and the discovered device (large-screen device) exchange data packets on the broadcast window and scanning window respectively, thereby achieving the goal of simultaneously discovering other devices using multiple technologies.

[0152] The following uses BLE and Wi-Fi (2.4GHz) as examples to illustrate the time-sharing strategy when a smartphone makes a query request using BLE and Wi-Fi (2.4GHz) broadcast services respectively. Figure 9 The diagram illustrates an example of BLE and Wi-Fi (2.4GHz) broadcasting service query requests in different time slots. Figure 9 As shown, each small box in the first row represents a time slot, and the number in the box indicates the time slot number. For smartphones, Figure 9The time slots shown can be called broadcast time slots. For example, the length of each time slot can be 1ms or 0.5ms. The second row represents the Wi-Fi (2.4GHz) channels. A small box in the second row represents a Wi-Fi (2.4GHz) channel, and the number in the small box represents the channel sequence. A small box in the third row represents a BLE channel, and the number in the small box represents the BLE channel number. Specifically, for Wi-Fi (2.4GHz) technology, channels 1, 6, and 11 are broadcast channels. For BLE technology, channels 37, 38, and 39 are broadcast channels.

[0153] like Figure 9 As shown, data can only be transmitted on a fixed channel of a specific technology (or capability) in each time slot. For example, in the first time slot, a service query request is broadcast on channel 1 of Wi-Fi 2.4 GHz; in the second time slot, it is broadcast on channel 6 of Wi-Fi 2.4 GHz; in the third time slot, it is broadcast on channel 11 of Wi-Fi 2.4 GHz; in the fourth time slot, it is broadcast on channel 37 of BLE; in the fifth time slot, it is broadcast on channel 38 of BLE; and in the sixth time slot, it is broadcast on channel 39 of BLE. In other words, when a smartphone simultaneously broadcasts service query requests using both BLE and Wi-Fi (2.4GHz), in the first to third time slots, only Wi-Fi (2.4GHz) technology is used to broadcast the service query requests on different channels. In the fourth to sixth time slots, only BLE technology is used to broadcast the service query requests on different channels. This achieves time-division broadcasting of BLE and Wi-Fi (2.4GHz) messages and solves the air interface conflict problem on the same frequency when a smartphone simultaneously broadcasts service query requests using both BLE and Wi-Fi (2.4GHz).

[0154] For the cases in Table 1 where conflicts arise when broadcasting service query requests using any two technologies simultaneously, and can also be used. Figure 9 In a similar manner, time-sharing broadcast service query requests are implemented, thereby resolving air interface conflicts between different technologies.

[0155] In this embodiment, if the six service query requests are used to query whether a peripheral device possesses certain capabilities or services, each of the six service query requests carries: the name of the target device, the type of the target device, and the target capability or service that the target device needs to support. The target service may include the service name, service ID, service attributes, etc. For example, the six service query requests may carry: whether the device has BT, Wi-Fi, USB, NFC, or Cellular capabilities, and / or whether it has file sharing, printing, or screen mirroring services.

[0156] Optionally, the six service query requests mentioned above may also carry information about the smartphone's own capabilities (e.g., smartphone name, device type, and capabilities or service capabilities). If the six service query requests do not carry information about the smartphone's own capabilities, then after the six service query requests, the smartphone and the large-screen device need to exchange additional broadcast messages to allow the large-screen device to obtain the smartphone's own capability information. Alternatively, the smartphone and the large-screen device can exchange information about the smartphone's own capabilities during the connection process.

[0157] It should be understood that, in this embodiment of the application, the six service query requests described above can be sent multiple times. For example, the six service query requests can be sent at a first moment, and at a later moment, the smartphone can repeatedly send the six service query requests or any multiple of the six service query requests. Optionally, the smartphone can periodically send the six service query requests described above.

[0158] In the S303, large-screen devices can select one or more technologies from BT, Wi-Fi, USB, NFC, and Cellular to listen to (or scan for) messages broadcast by surrounding devices, depending on their own capabilities. For example, a large-screen device can choose one or more of its supported capabilities (BT, Wi-Fi, USB, NFC, and Cellular) to listen to messages based on its supported capabilities, latency requirements, and power consumption.

[0159] In S303, since large-screen devices may choose one or more technologies, such as BLE, Wi-Fi, USB, NFC, and Cellular, to simultaneously listen to (scan) messages broadcast by peripheral devices, conflicts may arise between these technologies regarding channel and air interface timing. For example, when a large-screen device simultaneously uses BLE and Wi-Fi (2.4GHz) for scanning or listening, it can reuse existing scanning technologies to perform simultaneous scanning on both Wi-Fi (2.4GHz) and BLE chips, or it can utilize different technologies for scanning according to the time-division multiplexing strategy described in S302. Figure 9 The time slot relationship shown indicates that different techniques are used for scanning in different time slots.

[0160] For large-screen devices Figure 9 The various time slots shown can be referred to as scanning time slots. For example, in the first time slot, a Wi-Fi scan is performed on the first channel of Wi-Fi 2.4 GHz; in the second time slot, a Wi-Fi scan is performed on the sixth channel of Wi-Fi 2.4 GHz; and in the third time slot, a Wi-Fi scan is performed on the eleventh channel of Wi-Fi 2.4 GHz. In the 4th time slot, BLE scanning is performed on BLE channel 37; in the 5th time slot, BLE scanning is performed on BLE channel 38; and in the 6th time slot, BLE scanning is performed on BLE channel 39. In other words, when a large-screen device scans simultaneously using BLE and Wi-Fi (2.4GHz), only Wi-Fi (2.4GHz) scanning is used in the 1st to 3rd time slots, and only BLE scanning is used in the 4th to 6th time slots. This achieves time-division scanning of BLE and Wi-Fi (2.4GHz) and solves the air interface conflict problem when a large-screen device scans simultaneously using BLE and Wi-Fi (2.4GHz).

[0161] Optionally, in this embodiment, when the large-screen device scans according to the above-mentioned time slot sequence, the scanning can be divided into two stages: a coarse matching stage and a precise matching stage.

[0162] Coarse matching phase: When the large screen device (discovery device) performs a scan, without having synchronized its time slots with any discovery device, in order to make it easier for the large screen device to scan for service query requests broadcast by the smartphone, the scanning time slot of the large screen device needs to be twice or more than twice the broadcast time slot length of the smartphone.

[0163] Precise matching phase: When the large-screen device scans the service query request broadcast by the smartphone, it will synchronize the time slots with the smartphone. At this time, the scanning time slots of the large-screen device can be the same length as the scanning time slots of the smartphone.

[0164] For example, in this embodiment, the broadcast time slot of the smartphone can be 1ms, and the scanning time slot of the large-screen device can be 2ms. This allows the large-screen device, as the scanning end device, to more easily discover more broadcast devices. After the large-screen device and the smartphone complete time slot synchronization, the scanning time slot of the large-screen device can be reduced from 2ms to 1ms, thus matching the length of the smartphone's broadcast time slot and facilitating broadcast data interaction between the broadcast device (i.e., the smartphone) and the scanning device (i.e., the large-screen device).

[0165] In S304, after the large-screen device listens to or scans all or some of the six service query requests broadcast by the smartphone, assuming that the large-screen device listens to the first, second, third, fourth, and sixth service query requests: Based on the first service query request, the large-screen device determines the media access control (MAC) address corresponding to the smartphone's BT (BitTorrent) MAC address (hereinafter referred to as the BT MAC address). Based on the second service query request, it determines the MAC address corresponding to the smartphone's Wi-Fi MAC address (hereinafter referred to as the Wi-Fi MAC address). Based on the third service query request, it determines the MAC address corresponding to the smartphone's USB MAC address (hereinafter referred to as the USB MAC address). Based on the fourth service query request, it determines the MAC address corresponding to the smartphone's NFC MAC address (hereinafter referred to as the NFC MAC address). Based on the sixth service query request, it determines the MAC address corresponding to the smartphone's cellular network MAC address (hereinafter referred to as the cellular network MAC address). The cellular network MAC address can be understood as the smartphone's internet protocol (IP address). Furthermore, based on the random values ​​carried in the first, second, third, fourth, and sixth service query requests, the large-screen device determines that all six requests originate from the same device. The large-screen device can then use this information to obtain the smartphone's network identification information, which includes: BT MAC, Wi-Fi MAC, USB MAC, NFC MAC, and IP address. In other words, this network identification information comprises five parameters of the smartphone: its BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, and IP address. This network identification information is used to uniquely identify the smartphone.

[0166] It should be understood that, in the embodiments of this application, the network identification information of an electronic device is a set or combination of multiple addresses of the electronic device, wherein one address of the electronic device (e.g., a BT MAC address) is one element of the network identification information. The network identification information may include multiple elements. Furthermore, the number of elements included in the network identification information is expandable, that is, it can change dynamically. For example, the network identification information of the first electronic device may include four elements: BT MAC address, Wi-Fi MAC address, USB MAC address, and IP address. Alternatively, the network identification information of the first electronic device may also include five elements: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, and IP address.

[0167] Optionally, in this application example, the network identification information of the electronic device can be represented using a set or combination method.

[0168] It should be understood that, in this embodiment of the application, as another possible implementation, the first to fifth service query requests may also carry the smartphone's IP address. In this case, the large-screen device can also obtain the smartphone's IP address. Alternatively, if the first to fifth service query requests do not carry the large-screen device's IP address, after receiving the first to fifth service query requests, the large-screen device can also send a broadcast message to the smartphone to inquire about the smartphone's IP address and other capability information, thereby obtaining the smartphone's IP address.

[0169] During the process of discovering other devices simultaneously, since the smartphone repeatedly sends service query requests, when the smartphone sends one or more of the aforementioned six service query requests again, the large-screen device, having already acquired and saved the smartphone's network identification information, can determine that the multiple service query requests originate from the same device (e.g., referred to as the first device) based on the identical random values ​​carried in each of the multiple service query requests. Furthermore, based on the addresses carried in the different service query requests—such as multiple MAC addresses (BT, Wi-Fi, USB, NFC, or IP addresses)—the large-screen device compares these addresses with the previously stored smartphone network identification information (e.g., by calculating the distance using vector data). This comparison confirms that the first device and the smartphone are the same device, thus performing device deduplication and filtering out duplicate information. By using the device's network identification information to identify the device, and because this information is dynamic and can be expanded and updated according to changes in the device's supported capabilities, the device's network identification information can be dynamically expanded. Using the device's network identification information to identify the device can effectively prevent the device ID information from being tracked, solving the problem of easy tracking when using the device's unique ID to identify the device in the existing technology, and improving the device's security.

[0170] Alternatively, as another possible implementation, during the process of the large-screen device discovering other devices simultaneously, since the smartphone repeatedly sends service query requests, when the smartphone sends multiple service query requests in the next instance, the large-screen device has already obtained and saved the smartphone's network identification information. If none of these multiple service query requests carry random values, the large-screen device can determine that the multiple service query requests also originated from a smartphone by comparing the addresses carried in each request, such as one or more of the following: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, or IP address. This allows the large-screen device to perform device deduplication, thereby filtering out duplicate information.

[0171] It should be understood that in the example of this application, during different device discovery processes of the large screen device, for example, the large screen device performs device discovery every 5 minutes, the devices discovered in the previous discovery and the devices discovered in the next discovery also need to be deduplicated, and the broadcast content of the same device is identified as the same device. The deduplication process is the same as the process described above, and will not be repeated here for the sake of brevity.

[0172] In this embodiment, when a large-screen device receives multiple service query requests and identifies that all requests originate from the same smartphone, the device can share the information carried by these requests. For example, during a single device discovery process, suppose the large-screen device simultaneously receives service query requests broadcast by a smartphone using both BitTorrent (BT) and Wi-Fi methods. Since the data volume differs between BT and Wi-Fi broadcast requests (with a larger data volume), the large-screen device can filter and deduplicate the information carried by the Wi-Fi broadcast request. This avoids multiple interactions between the smartphone and the large-screen device using BT, saving signaling overhead and improving resource utilization.

[0173] For example, in different device discovery processes: if a device scanned by the large screen device in a later scan is the same device as one scanned by the large screen device in a previous scan, the device scanned by the large screen device in a later scan can share the device capabilities or service information of the device scanned by the large screen device in a previous scan. The large screen device only needs to synchronize some device capabilities or service information. It does not need to fully synchronize device capabilities and service information again, thereby saving signaling overhead and improving resource utilization.

[0174] In S305, after a large-screen device receives all or some of the six service query requests broadcast by a smartphone, it can choose one or more of its capabilities to reply to the smartphone (i.e., reply with response information). For example, the large-screen device can choose based on its own capabilities and the requirements of the scenario. Since the large-screen device is a constantly powered device, its Wi-Fi and BLE can be always on. After receiving multiple service query requests broadcast by the smartphone, it can choose to reply to the smartphone with broadcast messages simultaneously using Wi-Fi and BLE. Alternatively, the large-screen device can also choose between BLE and Wi-Fi capabilities from BLE, Wi-Fi, USB, NFC, and Cellular, depending on the power consumption and latency of different capabilities, thus simultaneously replying to the smartphone using both BLE and Wi-Fi.

[0175] Hypothesis: The large-screen device will ultimately choose to reply to messages to the smartphone via both Wi-Fi and BLE.

[0176] The first message sent to the smartphone via broadcast using BLE (Browser-Defined Link) includes: Wi-Fi capability indication information, USB capability indication information, NFC capability indication information, Cellular capability indication information, and a random value (or random code). The Wi-Fi capability indication information indicates whether the large-screen device has Wi-Fi communication capability. The USB capability indication information indicates whether the large-screen device has USB communication capability, the NFC capability indication information indicates whether the large-screen device has NFC communication capability, and the Cellular capability indication information indicates whether the large-screen device has cellular network communication capability. The random value is generated by the large-screen device and is used to uniquely identify the device. This random value is randomly generated by the large-screen device. It should be understood that the large-screen device can generate different random values ​​at different times. This random value is used to uniquely identify the large-screen device. The random value carried in multiple messages sent by the large-screen device in the same batch is the same, while the random value carried in different messages sent by the large-screen device is different.

[0177] Optionally, the first message may also include BLE capability indication information, which indicates that the large-screen device also has BLE communication capabilities. Alternatively, the first message may not include BLE capability indication information.

[0178] The second message, broadcast to the smartphone via Wi-Fi, includes: BT capability indication information, USB capability indication information, NFC capability indication information, Cellular capability indication information, and a random value (or random code). The BT capability indication information indicates whether the large-screen device has BT communication capability or not. The other capability indication information serves the same purpose as those in the first message. The random value in the second message is generated by the large-screen device and is used to uniquely identify the large-screen device; this random value is the same as the random value in the first message.

[0179] Optionally, the second message may also include Wi-Fi capability indication information, which indicates that the large-screen device also has Wi-Fi communication capabilities. Alternatively, the first message may not include Wi-Fi capability indication information.

[0180] Optionally, in this embodiment of the application, in addition to notifying the smartphone that the large-screen device also has other capabilities by carrying other capability indication information in the first and second messages respectively, other optional methods can also be used.

[0181] For example, one possible implementation is that the smartphone and the large-screen device negotiate rules in advance. For instance, a field could be set in each reply message (first message and second message) to indicate additional capabilities of the large-screen device. This field could be 5 bits long. The position of this field is fixed in each message, and both the smartphone and the large-screen device know its location and the meaning of each bit in advance.

[0182] In this 5-bit field, the first bit indicates whether the large-screen device has BLE communication capability; a value of 1 indicates that the device has BLE communication capability, and a value of 0 indicates that the device does not. Similarly, the second bit indicates whether the large-screen device has USB communication capability; a value of 1 indicates that the device has USB communication capability, and a value of 0 indicates that the device does not. The third bit indicates whether the large-screen device has NFC communication capability; a value of 1 indicates that the device has NFC communication capability, and a value of 0 indicates that the device does not. The fourth bit indicates whether the large-screen device has Wi-Fi communication capability; a value of 1 indicates that the device has Wi-Fi communication capability, and a value of 0 indicates that the device does not. The fifth bit indicates whether the large-screen device has cellular communication capabilities. A value of 1 indicates that the large-screen device has cellular communication capabilities, while a value of 0 indicates that the large-screen device does not. The indication rules for this field are pre-agreed upon by the large-screen device and the smartphone. In this way, this indication field can be used to indicate whether the large-screen device has other capabilities.

[0183] For example, as another possible implementation, the large-screen device and the smartphone can pre-agree on a rule: using different special strings (e.g., a string can be a specific sequence, consisting of at least one of numbers, letters, or special characters) to represent different capabilities. These different special strings may or may not be present in each reply message (first message and second message). For example, there could be five different special strings, representing BT communication capability, Wi-Fi communication capability, NFC communication capability, USB communication capability, and Cellular communication capability, respectively. If a particular special string is present in a message, it indicates that the large-screen device also possesses the communication capability corresponding to that special string; if it is not present, it indicates that the large-screen device does not possess the communication capability corresponding to that special string. The large-screen device and the smartphone pre-agree on the indication rules for the special strings. In this way, using these different special strings, it is possible to indicate that the large-screen device also possesses other communication capabilities.

[0184] It should be understood that, in the examples of this application, for instance, if the large-screen device supports Bluetooth communication capabilities, but the Bluetooth function on the large-screen device is turned off, the large-screen device will not be able to reply to messages to the smartphone via Bluetooth. However, the large-screen device can include Bluetooth capability indication information in messages broadcast or sent using other communication technologies to indicate that the large-screen device has Bluetooth communication capabilities. Alternatively, messages broadcast or sent using other communication technologies may not include Bluetooth capability indication information, meaning that the other device (smartphone) will not be informed whether the large-screen device supports Bluetooth communication capabilities.

[0185] Optionally, the first and second messages may also carry other capabilities or service information of the large-screen device (e.g., the name of the large-screen device, its device type, etc.). If the first and second messages do not carry other capabilities or service information of the large-screen device, then after the first and second messages, the large-screen device and the smartphone need to exchange additional broadcast messages to allow the smartphone to obtain other capabilities or service information of the large-screen device. Alternatively, other capabilities or service information of the large-screen device can be exchanged between the smartphone and the large-screen device during the connection process.

[0186] In this embodiment, if a service query request broadcast by a smartphone is used to query the target capabilities and target service information (e.g., one or more of BT, Wi-Fi, USB, NFC, Cellular, file sharing service, and screen casting service) of a peripheral device, the large-screen device needs to match its capabilities and service information. That is, the large-screen device needs to determine whether it meets the target capabilities and target service requirements based on the target capability or target service information carried in the service query request. If it does, it replies to the smartphone with a first message and a second message. The first and second messages may also carry indication information to indicate the large-screen device has detailed information about the target capability or target service. For example, the first and second messages may each contain indication information indicating that the large-screen device has capabilities such as BT, Wi-Fi, USB, NFC, and Cellular, and supports file sharing and screen casting services. If the target capabilities or target service are not met, the large-screen device will not reply to the smartphone with the first and second messages. Alternatively, if the target capabilities or target service are not met, the large-screen device will also reply to the smartphone with the first and second messages, which include indication information indicating that it does not have the target capability or target service.

[0187] In S306, after receiving the first message from the large-screen device via BitTorrent (BT) and the second message via Wi-Fi, the smartphone also obtains the network identification information of the large-screen device. Specifically, based on the first message, the smartphone can determine the BT MAC address of the large-screen device, and based on the second message, it can determine the Wi-Fi MAC address. Optionally, the smartphone can also obtain the IP address of the large-screen device. Based on the random values ​​carried in the first and second messages, the smartphone determines that the first and second messages originate from the same smartphone. The smartphone can obtain the network identification information of the large-screen device based on this information, which includes: BT MAC address, Wi-Fi MAC address, and IP address. This network identification information is used to uniquely identify the large-screen device. Optionally, if the smartphone does not obtain the IP address from the large screen, the network identification information includes: BT MAC address and Wi-Fi MAC address. That is, the network identification information of the large-screen device includes two parameters: the BT MAC address and the Wi-Fi MAC address of the large-screen device. This network identification information of the large-screen device is used to uniquely identify the large-screen device.

[0188] Optionally, in this embodiment of the application, the first message and the second message described above may each carry the IP address of the large-screen device. In this case, the smartphone can obtain the IP address of the large-screen device.

[0189] Alternatively, if the first and second messages do not carry the IP address of the large-screen device, after the large-screen device replies to the first and second messages, the smartphone can also send a broadcast message to the large-screen device to inquire about the large-screen device's IP address, thereby obtaining the large-screen device's IP address.

[0190] During the process of a smartphone discovering other devices, because the smartphone repeatedly sends the aforementioned six service query requests, the large-screen device will also repeatedly reply to the smartphone. After the smartphone receives the next reply from the large-screen device, since the smartphone has already acquired and saved its network identification information, when the smartphone receives one or more messages from the large-screen device using different methods (such as BT, Wi-Fi, USB, NFC, and Cellular), if these messages all carry the same random value, the smartphone can determine that the messages all originate from the same device (e.g., a second device) based on the identical random values ​​carried in each of the received messages. Furthermore, based on the addresses carried in the messages, such as: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, etc. By comparing multiple MAC addresses and IP addresses with previously stored network identification information of the large-screen device (e.g., through vector distance calculation), the smartphone can determine that the second device and the large-screen device are the same device, thus performing device deduplication. This deduplication process utilizes the device's network identification information, which is dynamic and can be expanded and updated according to changes in the device's capabilities. Therefore, using this network identification information to identify devices effectively prevents device ID information from being tracked, improving device security.

[0191] Alternatively, as another possible implementation, after the smartphone receives one or more messages from the large-screen device using different methods (such as BT, Wi-Fi, USB, NFC, and Cellular), if none of these messages carry random values, the smartphone can use the addresses carried in these messages, such as BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, and IP address, to compare the two with the previously stored network identification information of the large-screen device. This comparison can also determine that the second device and the large-screen device are the same device, thus performing device deduplication.

[0192] It should be understood that in this application example, during different device discovery processes of the smartphone—for example, if the smartphone performs device discovery every 5 minutes—devices discovered in previous and subsequent discoveries also need to undergo deduplication to identify broadcast content from the same device as the same device. The deduplication process is consistent with the process described above, and for the sake of brevity, it will not be elaborated here.

[0193] It should be understood that in this embodiment, since the smartphone queries surrounding broadcast services via various methods in S302, in S306, the smartphone may receive messages from other devices in addition to those from the large-screen device. After receiving messages from other devices, the smartphone can also obtain and store the network identification information corresponding to those devices to uniquely identify them. Using this network identification information, the smartphone can perform deduplication after receiving multiple messages from that device.

[0194] It should also be understood that in S306, after the smartphone receives the first message from the large-screen device via BitTorrent (BT) and the second message via Wi-Fi, and obtains the network identification information of the large-screen device, the large-screen device recognizes that both the first and second messages originate from the large-screen device. Therefore, the smartphone can merge and share the contents of the first and second messages (e.g., device information, capability information, resolution, bitrate, decoding rate, and data packet size of the large-screen device). This avoids the need for the smartphone to discover the large-screen device via BT and negotiate capabilities with it. Furthermore, when the smartphone has Wi-Fi-based services, it still needs to use Wi-Fi to discover the large-screen device and negotiate capabilities with it. This reduces signaling interaction, improves resource utilization, and enhances the user experience of distributed services.

[0195] For example, during the same device discovery process, suppose that when a smartphone simultaneously receives messages from a large-screen device via both BitTorrent (BT) and Wi-Fi, the data volume carried by the BT message differs from that of the Wi-Fi message (which carries a larger data volume than the BT message). Therefore, after receiving the Wi-Fi message from the large-screen device, the smartphone can filter and deduplicate its content. This avoids multiple interactions between the smartphone and the large-screen device via BT, thus saving signaling overhead and improving resource utilization.

[0196] For example, in different device discovery processes: if a device discovered by a smartphone later is matched with a device discovered by a smartphone earlier using grid identification and is found to be the same device, the device discovered by the smartphone later can share the capabilities or service information of the devices discovered by the smartphone earlier. The smartphone only needs to synchronize some device capabilities or service information, and does not need to fully synchronize device capabilities and service information again, thereby saving signaling overhead and improving resource utilization.

[0197] In S306, the smartphone deduplicates device information discovered through various wireless and wired technologies (capabilities), and displays the identifiers of the remaining distinct devices to the user, i.e., presenting a device list. For example, this display interface can be as follows: Figure 8 As shown by d in the figure.

[0198] In the S307, users can select a large-screen device from a list of multiple devices as needed, and then connect to the large screen.

[0199] It should be understood that in S307, in addition to the user manually selecting the target device to be connected from the list of multiple devices, the smartphone can also automatically select the target device according to preset conditions. For example, the preset conditions include: automatically connecting to other devices whose distance from the smartphone is less than a certain threshold, automatically connecting to devices with preset MAC addresses, etc. This application embodiment does not impose limitations.

[0200] S308, after the user selects a large-screen device, the smartphone sends a connection request to the large-screen device. In this embodiment, the connection request includes standard request information defined in the protocol corresponding to the optimal one or more connection methods (e.g., Wi-Fi, Bluetooth, etc.), such as connection address, connection window, security requirements, etc.

[0201] It should be understood that in the S308, the smartphone will select one or more of the optimal methods from among BT, Wi-Fi, NFC, USB, Zigbee, and mobile network to connect to the large-screen device, based on its own capabilities and the capabilities of the peer device (large-screen device), and further, based on the business information to be transmitted.

[0202] Optionally, as a possible implementation, connection strategies can be predefined in S308. For example, when both smartphones and large-screen devices support capabilities such as USB, Wi-Fi (5GHz), Wi-Fi P2P (5GHz), Wi-Fi (2.4GHz), Wi-Fi P2P (2.4GHz), BR / EDR, and BLE, for high-bandwidth services, during near-field transmission, different capabilities are prioritized from highest to lowest as follows: USB > Wi-Fi (5GHz) > Wi-Fi P2P (5GHz) > Wi-Fi (2.4GHz) > Wi-Fi P2P (2.4GHz) > BR / EDR > BLE. During far-field transmission, different capabilities (i.e., technologies) are prioritized from highest to lowest as follows: Ethernet > Wi-Fi > Cellular. When connecting a smartphone and a large-screen device, the smartphone can prioritize the capabilities mentioned above and select the highest-priority connection method from those supported by both the smartphone and the large-screen device. Alternatively, it can select several high-priority connection methods to connect to the large-screen device.

[0203] In this application example, as multiple service transmissions are connected between the smartphone and the large-screen device, the smartphone can monitor the communication latency and bandwidth information of each connection process during the multiple connections, dynamically adjust the subsequent connection establishment method with the large-screen device, and dynamically adjust the priority order of various capabilities.

[0204] In S309, after the large-screen device receives a connection request sent by the smartphone, it determines the connection method (e.g., any one of BT, Wi-Fi, USB, NFC, or Cellular) based on the information carried in the connection request, and establishes a communication connection between the large-screen device and the smartphone according to the connection method.

[0205] Optionally, in S309, as a possible implementation, assume that: the smartphone supports Bluetooth communication capabilities and Bluetooth is turned on. The large-screen device also supports Bluetooth communication capabilities, but Bluetooth is turned off on the large-screen device. Furthermore, the smartphone is aware that the large-screen device supports Bluetooth communication capabilities, or the smartphone is unsure whether the large-screen device supports Bluetooth communication capabilities, and the user wishes to establish a connection between the smartphone and the large-screen device via Bluetooth. In this case, the connection request received by the large-screen device carries information such as the connection address, connection window, and security requirements required for Bluetooth connection. Based on this connection request, the large-screen device first automatically turns on Bluetooth, or the large-screen device prompts the user to turn on Bluetooth on the large-screen device. After Bluetooth is turned on, the smartphone can establish a Bluetooth connection with the large-screen device. If the large-screen device does not support Bluetooth communication capabilities, or although the large-screen device supports Bluetooth communication capabilities, it does not temporarily allow Bluetooth to be turned on, then the large-screen device can prompt the user: the large-screen device does not currently support Bluetooth connection. Optionally, the large-screen device will not respond to the connection request sent by the smartphone. Alternatively, the large-screen device can reply to the smartphone with a message to notify the smartphone that the large-screen device does not currently support Bluetooth connectivity. In this case, the smartphone cannot establish a Bluetooth connection with the large-screen device, but the smartphone and the large-screen device can establish a connection based on other methods (such as Wi-Fi).

[0206] Optionally, in S309, as another possible implementation, if the large-screen device supports Bluetooth communication and Bluetooth is already turned on on the large-screen device, and the smartphone also supports Bluetooth communication but Bluetooth is turned off on the smartphone, and the user wants to connect the smartphone to the large-screen device via Bluetooth, then the smartphone will prompt the user to turn on Bluetooth. After Bluetooth is turned on on the smartphone, the connection request sent by the smartphone to the large-screen device will carry information such as the connection address, connection window, and security requirements required for Bluetooth connection. In this case, the smartphone can establish a Bluetooth connection with the large-screen device. If Bluetooth is turned off on the smartphone and cannot be turned on temporarily, and the user wants to connect the smartphone to the large-screen device via Bluetooth, then the smartphone will prompt the user that Bluetooth connection is not currently supported. The connection request sent by the smartphone to the large-screen device will not carry information such as the connection address, connection window, and security requirements required for Bluetooth connection. In this case, the smartphone cannot establish a Bluetooth connection with the large-screen device, but a connection based on other methods (such as Wi-Fi) can be established between the smartphone and the large-screen device.

[0207] Optionally, in S309, as another possible implementation, suppose that a user is using a smartphone to transfer video files to another device via Wi-Fi. The smartphone will then consider all currently supported communication technologies and select one or more communication technologies (such as Bluetooth) to establish a connection with the large-screen device, excluding Wi-Fi. In this case, the connection request sent by the smartphone to the large-screen device will not carry information such as the connection address, connection window, and security requirements required for Wi-Fi connection. The smartphone cannot establish a Wi-Fi connection with the large-screen device, but a connection based on other methods (such as Bluetooth) can be established between them.

[0208] Optionally, in S309, as another possible implementation, suppose that a user is using a large-screen device to transfer files to another electronic device via Wi-Fi. The large-screen device will then consider all currently supported communication technologies and, based on the connection request sent by the smartphone, select one or more communication technologies (such as Bluetooth) from among those other than Wi-Fi to establish a communication connection with the large-screen device. Optionally, the large-screen device can also reply to the smartphone with a message informing it that Wi-Fi is temporarily unsupported. In this case, even if the connection request sent by the smartphone to the large-screen device includes information such as the connection address, connection window, and security requirements required for Wi-Fi, the smartphone cannot establish a Wi-Fi connection with the large-screen device. However, a connection based on other methods (such as Bluetooth) can be established between the smartphone and the large-screen device.

[0209] It should be understood that in the embodiments of this application, multiple different technologies can be simultaneously established and exist between the smartphone and the large-screen device. For example, both BT connection and Wi-Fi connection can exist between the smartphone and the large-screen device at the same time.

[0210] In S310, after a communication connection is established between the large-screen device and the smartphone, the smartphone can transmit the data stream of the service to the large-screen device, and data communication between the two begins.

[0211] It should be understood that in the embodiments of this application, when multiple connections exist between a smartphone and a large-screen device at the same time, the smartphone can choose the optimal one, or select multiple of them simultaneously to transmit data to the large-screen device.

[0212] The method for discovering and connecting electronic devices provided in this application utilizes all the device discovery technologies (capabilities) of a single electronic device, or multiple technologies (capabilities) from all device discovery technologies (capabilities), to actively broadcast or send messages simultaneously. This satisfies the requirements of business services for discovering and connecting devices with various technical capabilities under heterogeneous network conditions, thereby improving user experience. Furthermore, using a device's network identifier to identify a device avoids the problem of easy tracking when using unique device IDs, which is commonly used in the industry. This effectively prevents device ID information from being tracked, improving device security, and also ensures that the network identifier changes dynamically when device capabilities change. Further, using the device's network identifier for device deduplication filters out duplicate information, allowing multiple discovery and connection technologies to be used in parallel, improving device discovery efficiency. Moreover, during device connection, the supported capabilities of the peer device can be obtained, allowing the selection of the optimal connection technology and capabilities based on business needs and scenarios, further enhancing user experience.

[0213] Figure 10 The image shown is in Figure 2 The illustrated scenario is a schematic flowchart of a method 400 for discovering and connecting to an electronic device provided in this application. Figure 2 In the scenario shown, it is assumed that the user's smartphone 210 has capabilities such as BitTorrent, Wi-Fi, NFC, USB, and Cellular. Wi-Fi can include two frequencies: 2.4GHz and 5GHz, represented as Wi-Fi (2.4GHz) and Wi-Fi (5GHz) respectively. The in-vehicle device 220 supports multiple capabilities including BitTorrent, Wi-Fi, and USB. The smartphone 210 can simultaneously listen to broadcast messages from surrounding devices using these multiple capabilities. The in-vehicle system has BitTorrent, Wi-Fi, and USB capabilities. The in-vehicle device 220 can use its broadcast capabilities via BitTorrent, Wi-Fi, and USB to allow the smartphone 210 to discover its presence, thus establishing a connection and data communication between the smartphone 210 and the in-vehicle device 220. The smartphone 210 discovers the in-vehicle device 220 using a passive discovery method. It is assumed that the smartphone 210 and the in-vehicle device 220 are already connected via USB. The smartphone can be understood as the discovery device, and the large-screen device can be understood as either the discovery device or the scanning device. Figure 10 As shown, the method 400 includes: S401 to S408.

[0214] S401, a smartphone that can subscribe to or listen to information about services or capabilities published by in-vehicle devices.

[0215] S402, the vehicle-mounted device actively broadcasts its own device or service information. Specifically, the vehicle-mounted device can utilize all its capabilities (BT, Wi-Fi, NFC, USB, etc.), or multiple capabilities simultaneously, to broadcast or send messages. The messages broadcast or sent using different methods carry information about the capabilities of the vehicle-mounted device. Furthermore, they can also carry service information (e.g., the device name, device type, supported file sharing, screen mirroring, etc.).

[0216] Suppose that the vehicle-mounted equipment uses BT, Wi-Fi, NFC, and USB to broadcast or send messages simultaneously.

[0217] The first message broadcast using the BT method carries: Wi-Fi capability indication information, NFC capability indication information, and USB capability indication information. The Wi-Fi capability indication information indicates that the vehicle-mounted device also broadcast the message using Wi-Fi; the NFC capability indication information indicates that the vehicle-mounted device also broadcast the message using NFC; and the USB capability indication information indicates that the vehicle-mounted device also sent the message using USB.

[0218] Optionally, the first message may also include: BT capability indication information, which indicates that the on-board equipment has also broadcast the message using the BT method.

[0219] Similarly, messages sent or broadcast using Wi-Fi, NFC, and USB respectively carry indications that the vehicle-mounted device also broadcast or sent messages using other methods simultaneously.

[0220] In other words, the messages broadcast using different methods each carry an instruction indicating that the on-board equipment is simultaneously broadcasting or sending messages using all of its other capabilities.

[0221] Optionally, in this embodiment, as another possible implementation, the BT capability indication information can also be used to indicate that the vehicle-mounted device also has BT communication capability, the Wi-Fi capability indication information can also be used to indicate that the vehicle-mounted device also has Wi-Fi communication capability, the NFC capability indication information can also be used to indicate that the vehicle-mounted device also has NFC communication capability, and the USB capability indication information can also be used to indicate that the vehicle-mounted device also has USB communication capability. In other words, various capability indication information can also be used to indicate that the vehicle-mounted device has a certain communication capability, but it does not mean that the vehicle-mounted device uses that communication capability to send or broadcast messages.

[0222] Optionally, in this embodiment, besides carrying other capability indication information in the four messages mentioned above to notify the in-vehicle device that the smartphone also utilizes other capabilities to broadcast or send service query requests to the in-vehicle device, other optional methods can also be used. The specific schemes are similar to those in method 300, and the corresponding descriptions can be found in the relevant descriptions in S302 of method 300. For brevity, they will not be repeated here.

[0223] In this embodiment of the application, each of the four messages also carries a random value (also known as a random code). The random values ​​carried by the six service query requests are all the same. The random value is generated by the vehicle-mounted device and is used to uniquely identify the vehicle-mounted device. That is, the random value is used to uniquely identify a device.

[0224] It should be understood that in this embodiment, when the vehicle-mounted device broadcasts messages simultaneously using all its capabilities (BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc.), conflicts may occur due to the various corresponding protocol specifications for different capabilities or technologies. This means that messages broadcast using multiple different technologies may interfere with each other. Therefore, when the vehicle-mounted device broadcasts messages using BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc., the conflict avoidance mechanism described in method 300 can be adopted. The specific solution is similar to that in method 300, and the corresponding description can be found in the relevant description in S302 of method 300. For simplicity, it will not be repeated here.

[0225] It should be understood that in this embodiment, the four messages described above can be sent multiple times. For example, the four messages can be sent at a first moment, and at a later moment, the vehicle-mounted device can repeatedly send the four messages or any multiple of the four messages. Optionally, the vehicle-mounted device can periodically send the four messages described above.

[0226] In S403, the smartphone selects one or more technologies from BT, Wi-Fi, USB, NFC, and Cellular to listen for broadcast messages from surrounding devices, based on its own capabilities. For example, the smartphone can choose one or more of its supported capabilities (BT, Wi-Fi, USB, NFC, and Cellular) to listen for messages based on its supported capabilities, latency requirements, and power consumption. The specific process of S403 can be referred to the description of S303 in Method 300. The difference is that S303 is for listening to large-screen devices, while S403 is for listening to smartphones. Apart from this, the other specific processes are the same and will not be repeated here.

[0227] S404. After a smartphone intercepts all or part of the four messages broadcast by the vehicle's onboard unit, assuming the smartphone intercepts the first, second, third, and fourth messages: Based on the first message, the smartphone determines the MAC address corresponding to the vehicle's Bit-Based (BT) capability (hereinafter referred to as the BT MAC address). Based on the second message, it determines the MAC address corresponding to the vehicle's Wi-Fi capability (hereinafter referred to as the Wi-Fi MAC address). Based on the third message, it determines the MAC address corresponding to the smartphone's NFC capability (hereinafter referred to as the NFC MAC address). Based on the fourth message, it determines the MAC address corresponding to the vehicle's USB capability (hereinafter referred to as the USB MAC address). Furthermore, based on the random values ​​carried in the first, second, third, and fourth messages, the smartphone determines that the first, second, third, and fourth messages all originate from the same device. Smartphones can use this information to obtain the network identification information of in-vehicle devices. This network identification information includes: BT MAC, Wi-Fi MAC, USB MAC, and NFC MAC. In other words, this network identification information includes four parameters of the in-vehicle device: its BT MAC address, Wi-Fi MAC address, USB MAC address, and NFC MAC address. This network identification information is used to uniquely identify the in-vehicle device.

[0228] Optionally, in this embodiment of the application, as another possible implementation, the first to fourth messages may also carry the IP address of the vehicle device. In this case, the smartphone can also obtain the IP address of the vehicle device, thereby obtaining the network identification information of the vehicle device. The network identification information includes: BT MAC, Wi-Fi MAC, USB MAC, NFC MAC, and IP address. That is, the network identification information includes five parameters of the vehicle device, namely: the BT MAC address of the vehicle device, the Wi-Fi MAC address of the vehicle device, the USB MAC address of the vehicle device, the NFC MAC address of the vehicle device, and the IP address of the vehicle device.

[0229] Alternatively, if the first to fourth messages do not carry the IP address of the vehicle device, after the smartphone receives the first to fourth messages, the smartphone can also send a broadcast message to the vehicle device to inquire about the IP address of the vehicle device, thereby obtaining the IP address of the vehicle device.

[0230] Furthermore, smartphones can utilize the network identification information of in-vehicle devices to perform device deduplication and information sharing between different technologies. For details, please refer to the description of S304 in method 300. The difference is that S304 performs deduplication for large-screen devices, while S404 performs deduplication for smartphones. Apart from this, the other specific processes are the same and will not be repeated here.

[0231] In S404, the smartphone deduplicates device information discovered through various wireless and wired technologies, displaying the identifiers of the remaining distinct devices to the user—essentially, showing a device list. For example, this display interface could be like this: Figure 8 As shown by d in the figure.

[0232] In the S405, users can select an in-vehicle device from a list of multiple devices as needed, and then establish a connection with the in-vehicle device.

[0233] It should be understood that in S405, in addition to the user manually selecting the target device to be connected from the list of multiple devices, the smartphone can also automatically select the target device according to preset conditions. For example, the preset conditions include: automatically connecting to other devices whose distance from the smartphone is less than a certain threshold, automatically connecting to devices with preset MAC addresses, etc. This application embodiment does not impose limitations.

[0234] In S406, after the user selects an in-vehicle device, the smartphone sends a connection request to the in-vehicle device. This connection request includes standard request information defined in the protocol corresponding to the optimal connection method (e.g., Wi-Fi, Bluetooth, etc.), which may include information such as connection address, connection window, and security requirements.

[0235] It should be understood that in S406, the smartphone, based on its own capabilities and the capabilities of the peer device (in-vehicle equipment), and further, considering the service information to be transmitted, can select one or more of the optimal methods—BT, Wi-Fi, NFC, USB, Zigbee, and mobile network—to connect to the large-screen device. The specific process can be found in the description of S308 in method 300, and will not be repeated here.

[0236] In S407, after receiving a connection request from a smartphone, the vehicle-mounted device determines the connection method (such as any one or more of BT, Wi-Fi, USB, NFC) based on the information carried in the connection request, and establishes a communication connection between the vehicle-mounted device and the smartphone according to the connection method.

[0237] It should be understood that, in the embodiments of this application, a variety of different technologies can be used to establish connections between the smartphone and the in-vehicle device. For example, both a BitTorrent connection and a Wi-Fi connection can be established simultaneously between the smartphone and the in-vehicle device.

[0238] In the S408, once a communication connection is established between the in-vehicle device and the smartphone, the user can send data to the in-vehicle device via the smartphone.

[0239] It should be understood that in the embodiments of this application, when multiple connections exist between a smartphone and an in-vehicle device at the same time, the smartphone can choose the optimal one, or select multiple of them simultaneously to transmit data to the in-vehicle device.

[0240] The method for discovering and connecting electronic devices provided in this application actively listens to broadcast messages from surrounding devices using all or multiple technologies (capabilities) possessed by the electronic device for discovering other devices. Furthermore, the surrounding devices actively broadcast messages using all or multiple technologies (capabilities) possessed by them, thus meeting the requirements of service providers in heterogeneous network conditions for discovering and connecting devices with diverse technical capabilities, thereby improving user experience. Moreover, using a device's network identifier to identify a device avoids the problem of easy tracking when using unique device IDs, which is commonly used in the industry. This effectively prevents device ID information from being tracked, improving device security, and also ensures that the network identifier changes dynamically when device capabilities change. Furthermore, using the device's network identifier for device deduplication filters out duplicate information, allowing multiple discovery and connection technologies to be used in parallel, improving device discovery efficiency. Additionally, during device connection, the supported capabilities of the peer device can be obtained, allowing the selection of the optimal connection technology and capabilities based on service requirements and scenarios, further enhancing user experience.

[0241] It should be understood that the above description is merely to help those skilled in the art better understand the embodiments of this application, and is not intended to limit the scope of the embodiments of this application. Based on the examples given above, those skilled in the art can obviously make various equivalent modifications or changes. For example, some steps in methods 300 and 400 may be unnecessary, or new steps may be added. Alternatively, any combination of two or more of the above embodiments may be used. Such modifications, changes, or combinations also fall within the scope of the embodiments of this application.

[0242] It should also be understood that the methods, situations, categories, and classifications of embodiments in this application are for the convenience of description only and should not constitute a special limitation. Various methods, categories, situations, and features in embodiments can be combined without contradiction.

[0243] It should also be understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. The order of the process numbers described above does not imply the order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0244] It should also be understood that the above description of the embodiments of this application focuses on highlighting the differences between the various embodiments. Any similarities or differences not mentioned can be referred to each other. For the sake of brevity, they will not be repeated here.

[0245] The above combination Figures 1-10 An embodiment of the method for discovering and connecting electronic devices provided in this application has been described. The electronic device provided in this application is described below.

[0246] This embodiment can divide the electronic device (including the first electronic device and the second electronic device mentioned above) into functional modules according to the above method. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0247] It should be noted that the relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0248] The electronic device provided in this application embodiment is used to execute any of the methods for discovering and connecting electronic devices provided in the above-described method embodiments, thus achieving the same effect as the above-described implementation method. When using integrated units, the electronic device may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the actions of the electronic device. For example, it can be used to support the electronic device in executing the steps executed by the processing unit. The storage module can be used to support the storage of program code and data, etc. The communication module can be used to support communication between the electronic device and other devices.

[0249] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.

[0250] For example, Figure 11 A schematic diagram of the hardware structure of an example electronic device 500 provided in this application is shown. This electronic device 500 can be a smartphone, a large-screen device, or an in-vehicle device as described in the above method embodiments. Figure 11 As shown, the electronic device 500 may include a processor 510, an external memory interface 520, an internal memory 521, a universal serial bus (USB) interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1, an antenna 2, a wireless communication module 550, etc.

[0251] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 500. In other embodiments of this application, the electronic device 500 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.

[0252] Processor 510 may include one or more processing units. For example, processor 510 may include 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). Different processing units may be independent components or integrated into one or more processors. In some embodiments, electronic device 500 may also include one or more processors 510. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0253] In some embodiments, the processor 510 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. The USB interface 530 is a USB standard-compliant interface, specifically a Mini USB interface, a Micro USB interface, a USB Type-C interface, etc. The USB interface 530 can be used to connect a charger to charge the electronic device 500, and can also be used for data transfer between the electronic device 500 and peripheral devices.

[0254] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 500. In other embodiments of this application, the electronic device 500 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0255] The wireless communication function of the electronic device 500 can be realized through antenna 1, antenna 2 and wireless communication module 550, etc.

[0256] The wireless communication module 550 can provide solutions for wireless communication applications on the electronic device 500, including Wi-Fi (including Wi-Fi sensing and Wi-Fi AP), Bluetooth (BT), NFC, USB, Zigbee, mobile networks, and wireless data transmission modules (e.g., 433MHz, 868MHz, 515MHz). The wireless communication module 550 can be one or more devices integrating at least one communication processing module. The wireless communication module 550 receives electromagnetic waves via antenna 1 or antenna 2 (or antenna 1 and antenna 2), filters and frequency-modulates the electromagnetic wave signals, and sends the processed signal to the processor 510. The wireless communication module 550 can also receive signals to be transmitted from the processor 510, frequency-modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 1 or antenna 2.

[0257] The external storage interface 520 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 500. The external memory card communicates with the processor 510 through the external storage interface 520 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0258] Internal memory 521 can be used to store one or more computer programs, which include instructions. Processor 510 can execute the instructions stored in internal memory 521, thereby causing electronic device 500 to perform the methods for discovering and connecting electronic devices provided in some embodiments of this application, as well as various applications and data processing. Internal memory 521 may include a code storage area and a data storage area. The code storage area may store the operating system. The data storage area may store data created during the use of electronic device 500. In addition, internal memory 521 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, processor 510 can execute instructions stored in internal memory 521 and / or instructions stored in memory disposed in processor 510, thereby causing electronic device 500 to perform any of the methods for discovering and connecting electronic devices provided in embodiments of this application, as well as other applications and data processing.

[0259] Electronic devices 500 include, but are not limited to, smart TVs, large-screen devices, mobile phones, tablets, laptops, large-screen TVs, smart home devices, PDAs, POS terminals, and in-vehicle computers. The embodiments described in this application are not limited thereto.

[0260] It should be understood that the specific process by which electronic device 500 performs the above-mentioned steps is described in the preceding text. Figure 6 , Figure 10 For the sake of brevity, the descriptions of the execution steps of smartphones, large-screen devices, or in-vehicle devices in the various embodiments shown are omitted here.

[0261] It should also be understood that the division of units in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, all units in the device can be implemented entirely through software calls from processing elements; all units can be implemented entirely in hardware; or some units can be implemented through software calls from processing elements, while others are implemented in hardware. For example, each unit can be a separate processing element, or it can be integrated into a chip within the device. Alternatively, it can be stored as a program in memory, and its function can be called and executed by a processing element within the device. Here, the processing element can also be called a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above units can be implemented through integrated logic circuits in the processor element or through software calls from processing elements. In one example, a unit in any of the above devices can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), or a combination of at least two of these forms of integrated circuits. As another example, when a unit in the device can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor capable of calling programs. Furthermore, these units can be integrated together to implement a system-on-a-chip (SOC).

[0262] This application also provides a system for discovering and connecting electronic devices, the system comprising: a first electronic device (e.g., a smartphone) and a second electronic device (e.g., a large-screen device or an in-vehicle device) provided in the above method embodiments.

[0263] This application also provides a computer-readable storage medium for storing computer program code, the computer program including instructions for executing any of the methods for discovering and connecting electronic devices provided in the embodiments of this application. The readable medium may be a read-only memory (ROM) or a random access memory (RAM), and this application does not impose any limitations on this.

[0264] This application also provides a computer program product including instructions that, when executed, cause a first electronic device and a second electronic device to perform corresponding operations in methods 300 and 400 described above.

[0265] This application also provides a chip located in a communication device, the chip including a processing unit and a communication unit. The processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer instructions to cause the communication device to perform any of the methods for discovering and connecting electronic devices provided in the embodiments of this application.

[0266] Optionally, the computer instructions are stored in a storage unit.

[0267] Optionally, the storage unit can be an internal storage unit within the chip, such as a register or cache. Alternatively, it can be an external storage unit located within the terminal, such as a ROM or other types of static storage devices capable of storing static information and instructions, such as random access RAM. The processor mentioned above can be a CPU, microprocessor, ASIC, or one or more integrated circuits used to control the execution of a program for transmitting the aforementioned feedback information. The processing unit and the storage unit can be decoupled and located on different physical devices, connected via wired or wireless means to implement their respective functions, thereby supporting the system chip in implementing the various functions described in the above embodiments. Alternatively, the processing unit and the memory can also be coupled to the same device.

[0268] In this embodiment, the communication device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0269] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be ROM, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be RAM, which is used as an external cache. RAM has various different types, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM).

[0270] In this application, various objects such as messages / information / devices / network elements / systems / apparatus / actions / operations / processes / concepts may be named. It is understood that these specific names do not constitute a limitation on the relevant objects. The names may be changed depending on the scenario, context, or usage habits. The understanding of the technical meaning of the technical terms in this application should be mainly determined from their functions and technical effects embodied / performed in the technical solution.

[0271] In the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of different embodiments are consistent and can be referenced by each other. The technical features of different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0272] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0273] The methods in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, they can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server integrating one or more available media.

[0274] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0275] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0276] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0277] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0278] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned readable storage medium includes various media capable of storing program code, such as USB flash drives, external hard drives, ROM, RAM, magnetic disks, or optical disks.

[0279] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for discovering and connecting electronic devices, characterized in that, The method includes: During a first time period, a first electronic device broadcasts a first message using a first communication technology. The first message is used to query the communication technology capabilities of other devices. The first message includes the identifier of the first electronic device corresponding to the first communication technology. During a second time period, the first electronic device broadcasts a second message using a second communication technology. The second message is used to query the communication technology capabilities of other devices. The first time period and the second time period overlap. The second message includes the identifier of the first electronic device corresponding to the second communication technology. The network identifier of the first electronic device includes: the identifier of the first electronic device corresponding to the first communication technology and the identifier of the first electronic device corresponding to the second communication technology. The identifier of the first electronic device corresponding to the first communication technology and the identifier of the first electronic device corresponding to the second communication technology are different. Both the first message and the second message include a first random code of the first electronic device. The first random code is used to uniquely identify the first electronic device. The same first random code included in the first message and the second message is used to determine that both the first message and the second message come from the first electronic device. The first electronic device receives response information sent by the second electronic device, the response information including indication information for indicating the communication technology capabilities of the second electronic device; The first electronic device determines the communication technology capabilities supported by the second electronic device based on the response information; The first electronic device establishes a communication connection with the second electronic device based on the communication technology capabilities supported by the second electronic device.

2. The method according to claim 1, characterized in that, The method further includes: During a third time period, the first electronic device broadcasts a third message using a third communication technology, the third message being used to query the communication technology capabilities of other devices; The third communication technology conflicts with the first communication technology; the first time period and the third time period do not overlap; and the second time period and the third time period overlap.

3. The method according to claim 1 or 2, characterized in that, The first message includes: indication information for indicating the communication technology capabilities of the first electronic device or indicating the communication technology used by the first electronic device to broadcast the message.

4. The method according to claim 1 or 2, characterized in that, The response information also includes: the second random code of the second electronic device.

5. The method according to claim 4, characterized in that, Before the first electronic device establishes a communication connection with the second electronic device based on the communication technology capabilities supported by the second electronic device, the method further includes: The first electronic device determines that the response information comes from the second electronic device based on the second random code; The first electronic device obtains the network identification information of the second electronic device based on the response information. The network identification information of the second electronic device includes the MAC address or IP address of the second electronic device.

6. The method according to claim 5, characterized in that, After the first electronic device receives the response information sent by the second electronic device, the method further includes: The first electronic device receives first information sent by the second electronic device, the first information including the network identifier of the second electronic device; The first electronic device determines that the first information comes from the second electronic device based on the network identification information of the second electronic device and the network identification of the second electronic device carried in the first information.

7. The method according to claim 1, 2, 5 or 6, characterized in that, The first electronic device establishes a communication connection with the second electronic device based on the communication technology capabilities supported by the second electronic device, including: The first electronic device determines the set of communication technology capabilities supported by both the first electronic device and the second electronic device based on the communication technology capabilities supported by the second electronic device. The first electronic device sends a connection request to the second electronic device according to the service to be transmitted, based on the set of communication technology capabilities. The connection request includes connection information corresponding to one or more communication technologies. The first electronic device establishes a communication connection with the second electronic device using one or more of the aforementioned communication technologies.

8. The method according to claim 7, characterized in that, The method further includes: The first electronic device sends the data of the service to be transmitted to the second electronic device through one or more communication technologies with which a communication connection has been established.

9. The method according to claim 1, 2, 5, 6 or 8, characterized in that, The first communication technology or the second communication technology is: Bluetooth, Wi-Fi, NFC, USB, Zipline, or cellular network, and the first communication technology is different from the second communication technology.

10. A method for discovering and connecting electronic devices, characterized in that, The method includes: Within a first time window, a first electronic device broadcasts a first message using a first communication technology. The first message is used to query the communication technology capabilities of other devices. The first message includes the identifier of the first electronic device corresponding to the first communication technology. Within the first time window, the first electronic device broadcasts a second message using a second communication technology. The second message is used to query the communication technology capabilities of other devices. The second message includes the identifier of the first electronic device corresponding to the second communication technology. The network identifier of the first electronic device includes: the identifier of the first electronic device corresponding to the first communication technology and the identifier of the first electronic device corresponding to the second communication technology. The identifier of the first electronic device corresponding to the first communication technology and the identifier of the first electronic device corresponding to the second communication technology are different. Both the first message and the second message include a first random code of the first electronic device. The first random code is used to uniquely identify the first electronic device. The same first random code included in the first message and the second message is used to determine that both the first message and the second message come from the first electronic device. The first electronic device receives response information sent by the second electronic device, the response information including indication information for indicating the communication technology capabilities of the second electronic device; The first electronic device determines the communication technology capabilities supported by the second electronic device based on the response information; The first electronic device establishes a communication connection with the second electronic device based on the communication technology capabilities supported by the second electronic device.

11. The method according to claim 10, characterized in that, The method further includes: Within the first time window, the first electronic device broadcasts a third message using a third communication technology. The third message is used to query the communication technology capabilities of other devices. The third communication technology conflicts with the first communication technology.

12. The method according to claim 11, characterized in that, The response information also includes: a second random code of the second electronic device; The first electronic device determines that the response information comes from the second electronic device based on the second random code; The first electronic device obtains the network identification information of the second electronic device based on the response information. The network identification information of the second electronic device includes the MAC address or IP address of the second electronic device.

13. A method for discovering and connecting electronic devices, characterized in that, The method includes: During a first time period, the second electronic device receives a first message broadcast by the first electronic device using a first communication technology. The first message is used to query the communication technology capabilities of other devices. The first message includes the identifier of the first electronic device corresponding to the first communication technology. During the second time period, the second electronic device receives a second message broadcast by the first electronic device using the second communication technology. The second message is used to query the communication technology capabilities of other devices. The first time period and the second time period overlap. The second message includes the identifier of the first electronic device corresponding to the second communication technology. The network identifier of the first electronic device includes: the identifier of the first electronic device corresponding to the first communication technology and the identifier of the first electronic device corresponding to the second communication technology. The identifier of the first electronic device corresponding to the first communication technology and the identifier of the first electronic device corresponding to the second communication technology are different. The second electronic device sends response information to the first electronic device based on the first message and the second message. Both the first message and the second message include a first random code of the first electronic device. The first random code is used to uniquely identify the first electronic device. The same first random code included in the first message and the second message is used to determine that both the first message and the second message come from the first electronic device. The response information includes indication information for indicating the communication technology capabilities of the second electronic device. The second electronic device receives the connection request sent by the first electronic device; The second electronic device establishes a communication connection with the first electronic device based on the connection request.

14. The method according to claim 13, characterized in that, The method further includes: During the third time period, the second electronic device receives a third message broadcast by the first electronic device using a third communication technology. The third message is used to query the communication technology capabilities of other devices. The third communication technology conflicts with the first communication technology; the first time period and the third time period do not overlap; and the second time period and the third time period overlap.

15. The method according to claim 13, characterized in that, The first message includes: indication information for indicating the communication technology capabilities of the first electronic device or indicating the communication technology used by the first electronic device to broadcast the message.

16. The method according to claim 13, characterized in that, Before the second electronic device establishes a communication connection with the first electronic device according to the connection request, the method further includes: The second electronic device determines, based on the first random code, that both the first message and the second message originate from the first electronic device. The second electronic device obtains the network identification information of the first electronic device based on the first message and the second message. The network identification information of the first electronic device includes the MAC address or IP address of the first electronic device.

17. The method according to claim 13, characterized in that, After the second electronic device receives the first message and the second message, the method further includes: The second electronic device receives second information sent by the first electronic device, the second information including the network identifier of the first electronic device; The second electronic device determines that the second information comes from the first electronic device based on the network identification information of the first electronic device and the network identification of the first electronic device carried in the second information.

18. The method according to any one of claims 13 to 17, characterized in that, The response information also includes: the second random code of the second electronic device.

19. The method according to claim 18, characterized in that, The method further includes: The second electronic device receives data for the service to be transmitted from the first electronic device through one or more communication technologies that have already established a communication connection.

20. An electronic device, characterized in that, include: Processor and memory; The processor is coupled to a memory, the memory storing program instructions, which, when executed by the processor, perform the method as described in any one of claims 1 to 12, or the method as described in any one of claims 13 to 19.

21. A chip, characterized in that, include: A processor for retrieving and running a computer program from memory, causing a communication device on which the chip is mounted to perform the method as described in any one of claims 1 to 12, or the method as described in any one of claims 13 to 19.

Citation Information

Patent Citations

  • Communication method and device

    CN105191172A