Method for discovering and connecting electronic equipment and electronic equipment
By using multiple communication technology capabilities in electronic devices to simultaneously broadcast messages in overlapping time periods, the problem of device discovery and connection in heterogeneous networks is solved, and efficient integration of multi-technical capabilities and user experience is achieved.
Patent Information
- Application Number
- CN202510181615.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2021-03-31
- Filing Date
- 2021-07-20
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-07-20
AI Technical Summary
In heterogeneous network architectures, it is difficult for the prior art to effectively discover and connect devices with multiple wireless technology capabilities, resulting in poor user experience.
By leveraging the multiple communication technology capabilities of one electronic device, the message is broadcast simultaneously in overlapping time periods to discover and connect another device, meeting the various technical capabilities requirements under heterogeneous network conditions.
It realizes efficient discovery and connection of devices with a variety of different technical capabilities under heterogeneous network conditions, improves the user experience, and supports the convergence of multiple discovery and connection technologies.
Smart Images

Figure CN119996977A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202110821297.8, and the original application date is July 20, 2021. The original application claims the priority of the prior application 202110351238.9, the priority date is March 31, 2021, and the entire contents of the original application are incorporated into this application by reference.
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on March 31, 2021, with application number 202110351238.9 and application name “Method for discovering and connecting electronic devices and electronic devices”, the entire contents of which are incorporated by reference in this application. Technical Field
[0003] The present application relates to the field of communications, and more specifically, to a method for discovering and connecting electronic devices and the electronic device. Background Art
[0004] There are many wireless and wired technologies involved in wireless communication networks, such as Bluetooth (BT), wireless-fidelity ( ) technology, near field communication (NFC) technology, Zigbee technology, universal serial bus (USB) technology, cellular communication (Cellular) technology, etc. When a device has the capabilities of multiple wireless technologies and wired technologies, it will use one of the technologies to discover other devices based on the type of business transmitted, the differences in the capabilities of different wireless and wired technologies (such as transmission distance, bandwidth, etc.), and establish communication connections and data transmission with other devices. However, this method cannot meet the needs of business services for devices with multiple wireless technology capabilities in heterogeneous network architectures, and the user experience is poor. Summary of the invention
[0005] The present application provides a method for discovering and connecting an electronic device and an electronic device. All device discovery technologies (capabilities) possessed by an electronic device or multiple of all device discovery technologies (capabilities) are used to simultaneously discover another device, thereby 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.
[0006] In a first aspect, a method for discovering and connecting electronic devices is provided, the method comprising: a first electronic device broadcasts a first message using a first communication technology within a first time period, the first message being used to query the communication technology capabilities of other devices; the first electronic device broadcasts a second message using a second communication technology within 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 receives response information (one or more response information) sent by 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.
[0007] The first aspect provides a method for discovering and connecting electronic devices, in which the first electronic device broadcasts messages respectively in overlapping time periods using multiple communication technologies, that is, the time periods for broadcasting messages respectively using multiple different communication technologies overlap in the time domain (partial overlap or full overlap). That is, by using all the device discovery technologies (capabilities) possessed by the same electronic device or multiple devices of all device discovery technologies (capabilities) to send (broadcast) messages simultaneously, the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions are met, and more devices that support distributed capabilities can be actively discovered, realizing the integration of multiple discovery and connection technologies, improving the efficiency of discovering and connecting electronic devices, and improving user experience.
[0008] In a possible implementation of the first aspect, the method further includes: the first electronic device broadcasts a third message using a third communication technology within a third time period, and the third message is used to query the communication technology capabilities of other devices; wherein the third communication technology and the first communication technology conflict, the first time period and the third time period do not overlap in the time domain, and the second time period and the third time period overlap. In this implementation, when the first electronic device broadcasts messages simultaneously using conflicting communication technologies (for example, conflicts in channels, air interface timing, etc.), the time periods for broadcasting messages using conflicting communication technologies do not overlap in the time domain, and the time periods for broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain (partial overlap or full overlap), thereby realizing the use of all device discovery technologies (capabilities) possessed by the same electronic device or multiple types of all device discovery technologies (capabilities) to simultaneously send (broadcast) messages, meet the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and improve user experience.
[0009] Exemplarily, in the embodiment of the present application, "simultaneous transmission" can be understood as: broadcasting a first message in a first time period using a first communication technology, and broadcasting a first message in a second time period using a second communication technology. If the first communication technology and the second communication technology do not conflict (for example, there is no conflict in channel, air interface timing, etc.), then the first time period and the second time period can overlap in the time domain (may be partially overlapped or completely overlapped). On this basis, broadcasting a third message in a third time period using a third communication technology, if the third communication technology conflicts with the first communication technology or the second communication technology (for example, there is a conflict in channel, air interface timing, etc.), then the third time period and the first time period do not overlap in the time domain, or the third time period and the second time period do not overlap in the time domain. That is, "simultaneous transmission" can be understood as: the time periods for sending messages using multiple non-conflicting communication technologies are overlapping in the time domain (partially overlapping or completely overlapping), while the time periods for sending messages using conflicting communication technologies are not overlapping in the time domain.
[0010] In a second aspect, a method for discovering and connecting electronic devices is provided, the method comprising: a first electronic device broadcasts 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 broadcasts 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 receives response information sent by the second electronic device; the first electronic device determines the communication technology capabilities supported by the second electronic device based on the response information (one or more response information); and 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.
[0011] The second aspect provides a method for discovering and connecting electronic devices, in which the first electronic device uses multiple communication technologies to send messages simultaneously within the time granularity of the same time window using multiple different communication technologies. This implements the use of all the technologies (capabilities) of the same electronic device for discovering devices or multiple technologies (capabilities) of all discovered devices to send (broadcast) messages simultaneously, meeting the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and can actively discover more devices that support distributed capabilities, realizing the integration of multiple discovery and connection technologies, improving the efficiency of discovering and connecting electronic devices, and improving user experience.
[0012] Exemplarily, the first time window can be understood as: the shortest time unit for sending a group of messages together using a variety of different communication technologies (for example: BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) defined in the wireless communication protocol, which is commonly followed 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 for discovering devices or a variety of technologies for discovering devices to send (broadcast) messages. The first time window is a time unit with the shortest length. 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 for discovering devices or a variety of technologies for discovering devices. The first time window is the smallest time granularity and is not divisible in time. In an embodiment of the present application, the length of the first time window can be microseconds, milliseconds, or seconds.
[0013] Exemplarily, the first time window consists of multiple time slots or multiple symbols.
[0014] In a possible implementation of the second aspect, the method further includes: the method further includes: the first electronic device broadcasts a third message using a third communication technology within the first time window, and the third message is used to query the communication technology capabilities of other devices; wherein the third communication technology and the first communication technology conflict. In this implementation, the first electronic device broadcasts messages separately using multiple non-conflicting communication technologies within the time window (that is, the time periods for broadcasting messages separately using multiple non-conflicting communication technologies overlap in the time domain, which may be partially or completely overlapping. Within the time window, the first electronic device simultaneously broadcasts messages using another communication technology. If another communication technology conflicts with a communication technology used to broadcast messages within the time window, multiple conflicting communication technologies are used to send broadcast messages in time-sharing within the time window. The requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions are met, thereby improving user experience.
[0015] Exemplarily, in the embodiments of the present application, "simultaneous transmission" can be understood as: within the time length of a time window, the electronic device simultaneously broadcasts messages using multiple non-conflicting communication technologies within the time window (that is, the time periods for broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain, which can be partial overlap or full overlap, for example: multiple non-conflicting communication technologies can start broadcasting messages at the same time). On this basis, within the time window, another communication technology is simultaneously used to broadcast messages. If another communication technology conflicts with a certain communication technology used to broadcast messages within the time window, multiple conflicting communication technologies are used to send service query requests in time-sharing within the time window. In other words, "simultaneous transmission" in the examples of the present application can be understood as: the electronic device needs to use multiple different communication technologies to broadcast messages simultaneously within the time granularity of a time window.
[0016] Exemplarily, the multiple different communication technology capabilities of the first electronic device include: multiple capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.
[0017] Exemplarily, the first electronic device and the second electronic device include, but are not limited to, smart TVs, large-screen devices, mobile phones, tablet computers, notebooks, large-screen TVs, smart home products, PDAs, car computers, etc.
[0018] In a possible implementation of the first aspect or the second aspect, the first message indicates the communication technology capability 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 be informed of the communication technology capability of the first electronic device, thereby facilitating the second electronic device to establish a communication connection with the first electronic device based on the communication technology capability of the first electronic device, thereby improving the efficiency of establishing the communication connection.
[0019] Exemplarily, the communication technology capabilities of the first electronic device include: multiple capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.
[0020] In a possible implementation of the first aspect or the second aspect, the first message and the second message both include a first random code of the first electronic device. The 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 the first random codes are used to uniquely identify the first electronic device. In this implementation, the same random code carried in different messages is used to identify that the first message and the second message are both from the first electronic device, which is easy to implement, saves communication resources, and has high accuracy.
[0021] In a possible implementation of the first aspect or the second 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. The random code is randomly generated by the second electronic device. The second electronic device can generate different random codes at different times, and the random code is used to uniquely identify the second electronic device. In this implementation, the first electronic device can be informed of the communication technology capabilities of the second electronic device, so that the first electronic device can establish a communication connection with the second electronic device according to the communication technology capabilities of the second electronic device, thereby improving the efficiency of establishing the communication connection. In addition, the same random code carried in different messages is used to identify that the first message and the second message are both from the first electronic device, which is easy to implement, saves communication resources, and has high accuracy.
[0022] In a possible implementation of the first aspect or the 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 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, and 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 second electronic device is identified by the network identification information of the second electronic device, and the network identification information of the second electronic device is changeable and can be dynamically expanded and updated according to the 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, solves the problem of being easily tracked when the unique ID of the device is used to identify the device in the prior art, and improves the security of the device.
[0023] Exemplarily, the network identification information of the second electronic device includes: BT MAC, Wi-Fi MAC, USB MAC, IP, that is, the network identification information of the second electronic device includes four parameters of the second electronic device, and the four parameters are: 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] Exemplarily, the response information sent by the second electronic device and received by the first electronic device may be one or more, and different response information is broadcast or sent by the second electronic device using different communication technologies.
[0025] In a possible implementation of the first aspect or the 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 receives the first information sent by the second electronic device, the first information including the network identification 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 by the first information. In this implementation, the first electronic device compares the network identification of the second electronic device included in the first information with the previously stored network identification information of the second electronic device, and can determine that the first information is sent by the second electronic device, that is, perform deduplication processing of the device. Furthermore, the content included in the multiple information sent by the second electronic device can be filtered and shared, so that multiple interactions between the first electronic device and the second electronic device can be avoided, thereby saving signaling overhead and improving resource utilization.
[0026] In a possible implementation of the first aspect or the second aspect, the first electronic device establishes a communication connection with the second electronic device according to the communication technology capabilities supported by the second electronic device, including: the first electronic device determines a set of communication technology capabilities supported by both the first electronic device and the second electronic device according to the communication technology capabilities supported by the second electronic device; the first electronic device sends a connection request to the second electronic device in the communication technology capability set according to the service to be transmitted, and the connection request includes connection information corresponding to one or more communication technologies respectively; the first electronic device establishes a communication connection with the second electronic device using the one or more communication technologies. In this implementation, the first electronic device can establish a communication connection with the second electronic device using one or more communication technologies, improve the efficiency of the communication connection, and meet the requirements of different service transmissions.
[0027] Exemplarily, the connection request includes: standard request information defined in the protocol corresponding to the optimal one or more connection modes (such as Wi-Fi, Bluetooth, etc.), for example, it may include information such as connection address, connection window, security requirements, etc.
[0028] Exemplarily, the first electronic device may predefine a connection strategy, and for large-bandwidth services, different capabilities may be sorted in order of priority from high to low during near-field transmission. During far-field transmission, different capabilities (i.e., technologies) may be sorted in order of priority from high to low. When the first electronic device and the second electronic device are connected, the first electronic device may select the highest priority method to connect to the large-screen device among the capabilities supported by both the first electronic device and the second electronic device according to the priorities of the above-mentioned different capabilities. Alternatively, the first few methods with higher priorities may be selected to connect to the second electronic device.
[0029] In a possible implementation of the first aspect or the second aspect, as multiple service transmissions are connected between the first electronic device and the second electronic device, the first electronic device can monitor the communication delay in each connection process, the bandwidth of each connection process, etc. during the multiple connections, dynamically adjust the subsequent way of establishing a connection with the second electronic device, and dynamically adjust the priority order of each different capability, so as to further improve the efficiency of the communication connection.
[0030] In a possible implementation of the first aspect or the 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 that have established a communication connection. In this implementation, when there are multiple connections between the first electronic device and the second electronic device at the same time, the first electronic device can select the best one, or select multiple of them at the same time to transmit data to the second electronic device, thereby improving the efficiency of data transmission between the first electronic device and the second electronic device and further improving the user experience.
[0031] In a third aspect, a method for discovering and connecting electronic devices is provided, the method comprising: a second electronic device receives a first message broadcast by a first electronic device using a first communication technology within a first time period, the first message being used to query the communication technology capabilities of other devices; the second electronic device receives a second message broadcast by the first electronic device using a second communication technology within a second time period, the second message being used to query the communication technology capabilities of other devices, and the first time period and the second time period overlap; the second electronic device sends a response message to the first electronic device based on the first message and the second message; the second electronic device receives a connection request sent by the first electronic device; and the second electronic device establishes 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, in which the first electronic device broadcasts messages respectively in overlapping time periods using multiple communication technologies, that is, the time periods for broadcasting messages respectively using multiple different communication technologies overlap in the time domain (partial overlap or full overlap). That is, by using all the device discovery technologies (capabilities) possessed by the same electronic device or multiple devices of all device discovery technologies (capabilities) to send (broadcast) messages simultaneously, the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions are met, and more devices that support distributed capabilities can be actively discovered, realizing the integration of multiple discovery and connection technologies, improving the efficiency of discovering and connecting electronic devices, and improving user experience.
[0033] In a possible implementation of the third aspect, the method further includes: the second electronic device receives a third message broadcast by the first electronic device using a third communication technology within a third time period, and the third message is used to query the communication technology capabilities of other devices; wherein the third communication technology conflicts with the first communication technology, the first time period and the third time period do not overlap in the time domain, and the second time period and the third time period overlap. In this implementation, when the first electronic device broadcasts messages simultaneously using conflicting communication technologies (for example, conflicts in channels, air interface timing, etc.), the time periods for sending service query requests using conflicting communication technologies do not overlap in the time domain, and the time periods for broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain (partial overlap or full overlap), thereby realizing the use of all device discovery technologies (capabilities) possessed by the same electronic device or multiple types of all device discovery technologies (capabilities) to simultaneously send (simultaneously broadcast) messages, meet the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and improve user experience.
[0034] In a fourth aspect, a method for discovering and connecting electronic devices is provided, the method comprising: a second electronic device receives a first message broadcast by a first electronic device 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 second electronic device receives a second message broadcast by the first electronic device using a second communication technology within the first time window; the second electronic device sends a response message to the first electronic device based on the first message and the second message; the second electronic device receives a connection request sent by the first electronic device; and the second electronic device establishes 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, in which the first electronic device uses multiple communication technologies to send messages simultaneously within the time granularity of the same time window using multiple different communication technologies. This implements the use of all device discovery technologies (capabilities) possessed by the same electronic device or multiple simultaneous sending (simultaneous broadcasting) of messages among all device discovery technologies (capabilities) of all device discovery devices, and meets the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions. It can actively discover more devices that support distributed capabilities, implement the integration of multiple discovery and connection technologies, improve the efficiency of discovering and connecting electronic devices, and improve user experience.
[0036] In a possible implementation of the fourth aspect, the method further includes: the second electronic device receives a third message broadcast by the first electronic device using a third communication technology within the first time window, and the third message is used to query the communication technology capabilities of other devices; wherein the third communication technology and the first communication technology conflict. In this implementation, the first electronic device broadcasts messages separately using multiple non-conflicting communication technologies within the time window (that is, the time periods for broadcasting messages separately using multiple non-conflicting communication technologies overlap in the time domain, which may be partially or completely overlapping. Within the time window, the first electronic device simultaneously broadcasts messages using another communication technology. If another communication technology conflicts with a certain communication technology used to broadcast messages within the time window, the conflicting communication technologies are used to send broadcast messages in time-sharing within the time window. The requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions are met, thereby improving user experience.
[0037] Exemplarily, the multiple different communication technology capabilities of the first electronic device or the second electronic device include: multiple capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.
[0038] Exemplarily, the first electronic device and the second electronic device include, but are not limited to, smart TVs, large-screen devices, mobile phones, tablet computers, notebooks, large-screen TVs, smart home products, PDAs, car computers, etc.
[0039] In a possible implementation of the third aspect or the fourth aspect, the first message indicates the communication technology capability 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 be informed of the communication technology capability of the first electronic device, thereby facilitating the second electronic device to establish a communication connection with the first electronic device based on the communication technology capability of the first electronic device, thereby improving the efficiency of establishing the communication connection.
[0040] In a possible implementation of the third aspect or the fourth aspect, the first message and the second message both include a first random code of the first electronic device. The random code is randomly generated by the first electronic device. The first electronic device can generate different random codes at different times, and the random codes are used to uniquely identify the first electronic device. In this implementation, the same random code carried in different messages is used to identify that the first message and the second message are both from the first electronic device, which is easy to implement, saves communication resources, and has high accuracy.
[0041] In a possible implementation of the third aspect or the 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 determines that the first message and the second message are both from the first electronic device according to the first random code; the second electronic device obtains the network identification information of the first electronic device according to the first message and the second message, and 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 first electronic device is identified by the network identification information of the first electronic device, and the network identification information of the first electronic device is changeable and can be dynamically expanded and updated according to the change of the capabilities supported by the first electronic device. Therefore, the network identification information of the first electronic device can be dynamically expanded, and the network identification information of the first electronic device is used to identify the device, which can effectively prevent the device ID information from being tracked, solves the problem of being easily tracked when the unique ID of the device is used to identify the device in the prior art, and improves the security of the device.
[0042] Exemplarily, the network identification information of the first electronic device includes: BT MAC, Wi-Fi MAC, NFC MAC, USBMAC, IP, that is, the network identification information of the first electronic device includes five parameters of the first electronic device, and the five parameters are: 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 a possible implementation of the third aspect or the fourth aspect, after the second electronic device receives the first message and the second message, the method further includes: the second electronic device receives the second information sent by the first electronic device, the second information including the network identification 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 by the second information. In this implementation, the second electronic device compares the network identification of the first electronic device and the previously stored network identification information of the first electronic device based on the second information including the network identification of the first electronic device, and can determine that the second information is sent by the first electronic device, that is, perform deduplication processing of the device. Further, the content included in the multiple messages sent by the first electronic device can be filtered and shared, so that multiple interactions between the first electronic device and the second electronic device can be avoided, thereby saving signaling overhead and improving resource utilization.
[0044] In a possible implementation of the third aspect or the fourth aspect, the second electronic device sends response information to the first electronic device according to the first message and the second message, including: the second electronic device sends the first response information to the first electronic device using the fourth communication technology in the fourth time period; the second electronic device sends the second response information to the first electronic device using the fifth communication technology in the fifth time period, and the fourth time period and the fifth time period overlap. In this implementation, the second electronic device broadcasts messages respectively in overlapping time periods using multiple communication technologies, that is, uses multiple different communication technologies to send response information (broadcast messages) to the first electronic device respectively. The time periods for sending multiple response messages overlap in the time domain (partial overlap or full overlap). That is, using all the technologies (capabilities) of the same electronic device to discover devices or multiple technologies (capabilities) of all discovered devices to simultaneously send messages, the requirements of the business service for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions are met, and the integration of multiple discovery and connection technologies is realized to improve the efficiency of discovering and connecting electronic devices and improve user experience.
[0045] In a possible implementation of the third aspect or the fourth aspect, the method further includes: the second electronic device sends 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 and the sixth time period overlap. In this implementation, when the second electronic device uses conflicting communication technologies (for example, there is a conflict in channel, air interface timing, etc.) to send response information (broadcast messages) at the same time, the time periods for sending messages using the conflicting communication technologies do not overlap in the time domain, and the time periods for sending messages using multiple non-conflicting communication technologies overlap in the time domain (partial overlap or full overlap), thereby realizing the use of all device discovery technologies (capabilities) of the same electronic device or multiple devices in all device discovery technologies (capabilities) to send messages simultaneously, 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.
[0046] In a possible implementation of the third aspect or the fourth aspect, the second electronic device sends a response message to the first electronic device according to the first message and the second message, including: the second electronic device sends a first response message to the first electronic device using a fourth communication technology within a second time window; the first electronic device sends a second response message to the first electronic device using a fifth communication technology within the second time window. In this implementation, the second electronic device uses multiple communication technologies to send messages simultaneously using these multiple different communication technologies within the time granularity of the same time window. It is achieved that all the technologies (capabilities) of the same electronic device for discovering devices or multiple technologies (capabilities) of all discovered devices are used to send messages simultaneously, meeting the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions. It is achieved that the integration of multiple discovery and connection technologies is supported, the efficiency of discovering and connecting electronic devices is improved, and the user experience is improved.
[0047] In a possible implementation of the third aspect or the 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 the second random code is used to uniquely identify the second electronic device. Using the same random code carried by different response information to identify that the first response information and the second response information are both from the second electronic device is easy to implement, saves communication resources, and has high accuracy. In addition, the first electronic device can be informed of the communication technology capabilities of the second electronic device, thereby facilitating the first electronic device to establish a communication connection with the second electronic device based on the communication technology capabilities of the second electronic device, thereby improving the efficiency of establishing a communication connection.
[0048] In a possible implementation of the third aspect or the fourth aspect, the connection request includes: connection information corresponding to one or more communication technologies. In this implementation, the first electronic device can establish a communication connection with the second electronic device using one or more communication technologies, thereby improving the efficiency of the communication connection and meeting the requirements of different business transmissions.
[0049] Exemplarily, the connection request includes: standard request information defined in the protocol corresponding to the optimal one or more connection modes (such as Wi-Fi, Bluetooth, etc.), for example, it may include information such as connection address, connection window, security requirements, etc.
[0050] In a possible implementation of the third aspect or the fourth aspect, the method further includes: the second electronic device receives the data of the service to be transmitted sent by the first electronic device through one or more communication technologies that have established a communication connection. In this implementation, when there are multiple connections between the first electronic device and the second electronic device at the same time, the first electronic device can select the best one, or select multiple ones at the same time to transmit data to the second electronic device, thereby improving the efficiency of data transmission between the first electronic device and the second electronic device and further improving the user experience.
[0051] In a fifth aspect, an electronic device is provided, comprising: a unit for executing each step in the above first aspect or any possible implementation of the first aspect, or a unit for executing each step in the above second aspect or any possible implementation of the second aspect.
[0052] In the sixth aspect, an electronic device is provided, which includes: a unit for executing each step in the above third aspect or any possible implementation of the third aspect, or a unit for executing each step in the above fourth aspect or any possible implementation of the fourth aspect.
[0053] In the seventh aspect, an electronic device is provided, which includes at least one processor and a memory, and the at least one processor is used to execute: the method in the above first aspect or any possible implementation of the first aspect, or the method in the above second aspect or any possible implementation of the second aspect.
[0054] In an eighth aspect, an electronic device is provided, comprising at least one processor and a memory, wherein the at least one processor is used to execute: a method in the third aspect or any possible implementation of the third aspect, or a method in the fourth aspect or any possible implementation of the fourth aspect.
[0055] In the ninth aspect, an electronic device is provided, which includes at least one processor and an interface circuit, and the at least one processor is used to execute: the method in the above first aspect or any possible implementation of the first aspect, or the method in the above second aspect or any possible implementation of the second aspect.
[0056] In the tenth aspect, an electronic device is provided, which includes at least one processor and an interface circuit, and the at least one processor is used to execute: the method in the above third aspect or any three possible implementations of the third aspect, or the method in the above fourth aspect or any possible implementation of the fourth aspect.
[0057] In the eleventh aspect, a communication device is provided, which includes any electronic device provided in the fifth, seventh or ninth aspect.
[0058] In the twelfth aspect, a communication device is provided, which includes any electronic device provided in the sixth aspect, the eighth aspect or the tenth aspect.
[0059] In the thirteenth aspect, a communication system is provided, which includes: any electronic device provided in the fifth, seventh, ninth, or eleventh aspect, and any electronic device provided in the sixth, eighth, tenth, or twelfth aspect.
[0060] In the fourteenth aspect, a computer program product is provided, which includes a computer program, which, when executed by a processor, is used to execute the method in any one of the first to fourth aspects, or to execute the method in any possible implementation of any one of the first to fourth aspects.
[0061] In the fifteenth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed, it is used to execute the method in any one of the first to fourth aspects, or to execute the method in any possible implementation of any one of the first to fourth aspects.
[0062] In the sixteenth aspect, a chip is provided, comprising: a processor, for calling and running a computer program from a memory, so that a communication device equipped with the chip executes a method in any one of the first to fourth aspects, or for executing a method in any possible implementation of any one of the first to fourth aspects.
[0063] The method for discovering and connecting electronic devices and the electronic device provided by the present application utilize all the technologies (capabilities) of discovering devices possessed by the same electronic device or multiple technologies (capabilities) of discovering devices to simultaneously broadcast or send messages simultaneously, so as to meet the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and enable multiple discovery and connection technologies to be used in parallel, thereby improving the efficiency of device discovery. Improve user experience. In addition, using the network identification information of the device to identify a device can avoid the problem that the unique device ID commonly used in the industry is easily tracked when identifying the device, and can effectively prevent the device ID information from being tracked, thereby improving the security of the device, and at the same time satisfying the requirement that when the device capability is dynamically changing, the network identification information changes dynamically accordingly. Furthermore, the network identification of the device is used to deduplicate the device, thereby filtering out duplicate information, and when connecting the device, the supported capabilities of the opposite device can be obtained, so that the optimal connection technology and connection capability can be selected according to the business and scenario for connection, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 This is a schematic diagram of an application scenario provided by the present application that is applicable to an embodiment of the present application.
[0065] Figure 2 This is another schematic diagram provided by the present application that is applicable to an application scenario of an embodiment of the present application.
[0066] Figure 3 It is a schematic diagram of the system architecture of an example of an electronic device provided in this application.
[0067] Figure 4 This is a schematic diagram of an example provided in the present application of a process in which a discovery end device discovers surrounding devices through an active discovery method.
[0068] Figure 5 This is a schematic diagram of an example provided in the present application of a process in which a discovery end device discovers surrounding devices through a passive discovery method.
[0069] Figure 6 This is a schematic flowchart of a method for discovering and connecting an electronic device provided in an embodiment of the present application.
[0070] Figure 7 This is a schematic user interface diagram of an example of a user triggering a smartphone to actively discover surrounding devices, provided in an embodiment of the present application.
[0071] Figure 8 This is another schematic user interface diagram provided by an embodiment of the present application in which a user triggers a smartphone to actively discover surrounding devices.
[0072] Fig. 9This is a schematic diagram of an example of BLE and Wi-Fi (2.4GHz) broadcasting service query requests in different time slots provided by an embodiment of the present application.
[0073] Fig.10 This is a schematic flowchart of another method for discovering and connecting an electronic device provided in an embodiment of the present application.
[0074] Fig.11 It is a schematic block diagram of an example of an electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0075] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0076] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0077] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0078] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" used in this application covers computer programs that can be accessed 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 tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). In addition, 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 device in the embodiment of the present application may refer to a user device, an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent or a user device. The terminal device may also be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with wireless or wired communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network or a terminal device in a public land mobile communication network (PLMN) to be evolved in the future, for example, the terminal device may be a smart TV, a large screen device, a smart screen, a smart phone, a smart speaker, a laptop, a tablet computer, a vehicle-mounted telematics processor (T-BOX), a vehicle machine device, etc. The embodiment of the present application is not limited to this.
[0080] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" used in this application covers computer programs that can be accessed 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 tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memory (EPROM), cards, sticks or key drives, etc.). In addition, 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] There are many wireless technologies and wired technology solutions involved in wireless communication networks, such as Bluetooth (BT) technology, Wi-Fi technology, NFC technology, Zigbee technology, USB technology, cellular communication (Cellular) technology, etc. At present, different types of terminal devices can have the ability to communicate with multiple wireless technologies or wired technologies. Due to differences in device capabilities (such as memory size, power consumption, etc.) and differences in the capabilities of different wireless technologies (such as transmission distance, bandwidth, etc.), different technologies are often used on different devices (such as large-screen devices, car computers, speakers, watches, smart switches, etc.) to connect and communicate with other devices.
[0082] For example, for an electronic device, out-of-band (OOB) data can be used to communicate with other devices. OOB is a standard processing method, the essence of which is to first discover the device using the first discovery connection technology, exchange the connection information of the second connection technology in the process of discovering the device, and finally connect the devices and transmit data through the second connection technology. For example, a device discovers another device through NFC touch. In the process of discovering another device using NFC, the two devices exchange Bluetooth connection information with each other, and finally use Bluetooth to establish a connection between the two devices and transmit data. This can effectively shorten the discovery delay of Bluetooth technology, and use NFC touch instead of Bluetooth scanning to discover devices, thereby improving user convenience.
[0083] However, when using the OOB method to discover devices, it actually only uses one technical means to discover devices. In other words, when a device discovers another device, even if the device has multiple wireless technology capabilities, it can only use one of the device's wireless technologies to discover the other device. This cannot meet the business service requirements for devices with multiple wireless technology capabilities in a heterogeneous network architecture, and the user experience is poor.
[0084] When a device has the capabilities of multiple wireless and wired technologies, there is another way to discover and connect two devices, that is, according to the priorities of the multiple wireless and wired technologies of the device, it will first use the high-priority wireless or wired technology to scan for a period of time. After the scanning time is over, it will start the low-priority technology and scan for another period of time. After scanning other devices, it will connect to the device. This method actually still uses a technical means to discover devices, which cannot meet the business service requirements for devices with multiple wireless technology capabilities in a heterogeneous network architecture, and the user experience is poor.
[0085] In view of this, the present application provides a method for discovering and connecting electronic devices, which utilizes all device discovery technologies (capabilities) possessed by the same electronic device or multiple of all device discovery technologies (capabilities) to simultaneously discover another device, and selects the best one or more technologies for device connection and data transmission according to different business needs and network environments, thereby achieving support for 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 The present application provides a schematic diagram of an application scenario applicable to an embodiment of the present application. Figure 1 The diagram shown is a schematic diagram of a family scene, such as Figure 1 The illustrated scenario includes a first electronic device and a second electronic device. Figure 1 In the example, the first electronic device takes a user using a smartphone 110 as an example, and the second electronic device takes a large-screen device 120 in the home as an example. Among them, the smartphone 110 can support multiple technologies or capabilities for discovering devices. For example, the smartphone 110 can support multiple capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc. The large-screen device 120 supports multiple capabilities such as BT, Wi-Fi, NFC, USB, Cellular, etc. When the user uses the smartphone 110 to discover and connect the large-screen device 120, the method for discovering and connecting electronic devices provided in this application can be used. The smartphone 110 can use BT technology, Wi-Fi, NFC, Zigbee, USB, Cellular, etc. to discover the large-screen device 120 at the same time, and select the best one of the technologies for device connection and data transmission according to the business or network environment.
[0087] It should be understood that Figure 1 This is only for illustration and should not impose any limitation on the application scenarios applicable to the embodiments of the present application. Figure 1 The application scenario shown may also include other household devices, such as personal computers, PADs, etc. When the user discovers and connects these devices using the smart phone 110, the method for discovering and connecting electronic devices provided in this application may also be used.
[0088] Figure 2 The present application provides another schematic diagram of an application scenario applicable to an embodiment of the present application. Figure 2 The diagram shown is a schematic diagram of the Internet of Vehicles scenario. Figure 2 The illustrated scenario includes a first electronic device and a second electronic device. Figure 2In the example, the first electronic device is a user using a smart phone 210, and the second electronic device is a vehicle-mounted device 220. The vehicle-mounted device 220 may include an electronic control unit (ECU), a driving computer, a vehicle-mounted computer or a vehicle-mounted T-BOX, etc., which are not limited in the embodiments of the present application. The smart phone 210 may support a variety of technologies or capabilities for discovering devices. For example, the smart phone 210 may support a variety of capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc. The vehicle-mounted device 220 supports a variety of capabilities such as BT, Wi-Fi, NFC, USB, Cellular, etc. When the user discovers and connects the vehicle-mounted device 220 using the smart phone 210, the method for discovering and connecting electronic devices provided in this application may be used. The smart phone 210 may use BT technology, Wi-Fi, NFC, Zigbee, USB, Cellular, etc. to discover the vehicle-mounted device 220 at the same time, and select the best technology according to the business or network environment for device connection and data transmission.
[0089] It should be understood that Figure 2 This is only for illustration and should not impose any limitation on the application scenarios applicable to the embodiments of the present application. Figure 2 The application scenarios shown may also include other vehicle-mounted devices and user devices, etc. The embodiments of the present application are not limited here.
[0090] It should also be understood that in the embodiments of the present application, BT may include classic Bluetooth and low energy Bluetooth (BLE), wherein 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 application scenarios of the embodiments of the present application are merely illustrative. The method for discovering and connecting electronic devices provided in the present application can also be applied to other scenarios, and the embodiments of the present application are not limited here.
[0092] Figure 3 FIG. 1 is a schematic diagram of the system architecture of the electronic device provided by the present application. Figure 3As shown, the system architecture mainly includes: a discovery module and a connection module. Among them, the discovery module may include: a discovery device module and / or a discovered device module, a plug-in management module for discovering connection capabilities (Discover Ability Plugin Mgmt), a discovery connection strategy 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 mode management modules. The connection module includes: a connection management module (Connect Manager), a connection 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 embodiment of the present application, the system architecture of the electronic device may include Figure 3 The two modules shown, the discovery device module and the discovered device module, may also include any one of the discovery device module and the discovered device module. If an electronic device includes the discovery device module and the discovered device module, the electronic device may have an active discovery function and a passive discovery function, that is, the electronic device may be a discovery end device or a discovered end device. If the electronic device includes the discovery device module but does not include the discovered device module, the electronic device has an active discovery function but does not have a passive discovery function, that is, the electronic device is a discovery end device. If the electronic device includes a discovered device but does not include the discovery device module, the electronic device may have a passive discovery function but does not have an active discovery function, that is, the electronic device is a discovered end 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 device discovery module is mainly responsible for managing the capabilities of the discovery-end devices. The device discovery module is responsible for managing various capabilities on the discovery-end devices (such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) through the plug-in management module for discovering connection capabilities; and through the discovery connection strategy management module, scheduling the underlying BT, Wi-Fi, NFC, Zigbee, USB, Cellular or other discovery capabilities.
[0096] The function of the discovered device module is similar to that of the discovered device module, and it is mainly responsible for the ability of the discovered end device.
[0097] The plug-in management module for discovering connection capabilities is responsible for registering and managing various capabilities on the device (such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.).
[0098] It is found that the connection policy management module is responsible for the coordination and scheduling between various capabilities (ie, various connection technologies) on the device.
[0099] The connection management module and the connection state machine module are responsible for the negotiation and suggestion of connections of various capabilities (ie, various connection technologies).
[0100] The discovery management modules and link modules of various connection technologies are responsible for the discovery of specific connection technologies (such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) and the implementation of connection behaviors.
[0101] It should be understood that Figure 3 This is only exemplary and should not impose any restrictions on the system architecture of the electronic device in this application. Figure 3 The examples shown include different modules, more or fewer modules, or a combination of multiple different modules, etc. The embodiments of the present application are not limited here.
[0102] The following introduces the discovery end device and the discovered end device in the embodiments of the present application.
[0103] The discovery end device can discover surrounding devices with one or more services or capabilities by broadcasting messages to other devices in the vicinity or listening to messages broadcast by other devices, and prompt the user to select a device or service for connection. In addition, the discovery end device will actively initiate a connection request.
[0104] In other words, the discovery end device can obtain the services or capabilities supported by the surrounding devices through active broadcasting or passive monitoring, and is the initiator of the connection action with other devices.
[0105] In the embodiments of the present application, the capabilities of the peripheral device can be understood as various wireless and wired connection technologies that the peripheral device has, including: BT, Wi-Fi, NFC, Zigbee, USB, Cellular and other technologies or capabilities. The services of the peripheral device can be understood as various services or businesses based on the capabilities supported by the device, such as file sharing, printing, screen projection and other services.
[0106] The discovered device: can notify surrounding devices of its own capabilities and services by replying to the messages broadcast by the discovered device or by means of feedback monitoring, so that the capabilities and services of its own device can be perceived by surrounding devices. Feedback monitoring (or passive monitoring feedback method) can be understood as: the discovering device (i.e. the monitoring device) subscribes (or monitors) the information published by the discovered device (i.e. the monitored device), and the discovered device actively broadcasts messages to enable the discovering device to monitor. The discovered device will receive the connection request of the discovered device, and then perform binding authentication or authentication process.
[0107] In other words, the discovered device will notify surrounding devices of its own device services or capabilities through active broadcasting or passive monitoring feedback, and the discovered device is the recipient of the connection action between other devices.
[0108] The active discovery method and the passive discovery method in the embodiments of the present application are introduced below.
[0109] Active discovery method: Active discovery is that the discovery end device actively broadcasts service query requests to surrounding devices through broadcasting, and then waits for the discovered end device to reply with its service information or capability information. After receiving the service information or capability information replied by the discovered end device, it is provided to the upper-level caller for calling.
[0110] The service query request actively broadcast by the discovery end device may carry the conditions that the discovery end device expects the discovered end device to meet, such as: device name, device type, device capabilities (such as whether it contains audio, video and other capabilities), service information (such as whether it supports screen projection service, printing service, etc.), etc. The service information carried in the service query request is mainly used to match the expected service capabilities of the discovered device. For example, the service information may include: service name, service ID, service attributes, etc.
[0111] Optionally, the service query request may also carry capability information of the discovery end device itself (eg, device name, device type, device capability or service capability, etc.), with the purpose of optimizing the discovery process and reducing subsequent discovery process interactions.
[0112] For example, Figure 4The present application shows a schematic diagram of a process in which a discovery end device discovers surrounding devices by actively discovering. Figure 4 In the example shown, the discovering end 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 broadcasts a service query request to device B, device C, device D, and device X at the same time. The service query request includes: capability information and / or service information that the target device needs to support, etc. For example, the capabilities that the target device needs to support may include: one or more of BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc. The services that the target device needs to support may include: one or more of file sharing, screen projection, printing, etc. Optionally, the service query request may also include device A's own capability information, etc.
[0114] After device B, device C, device D, and device X receive the broadcast service query request respectively, device B determines whether it meets the broadcast requirements of device A according to the service query request, for example, whether device B supports the capabilities and services required to be supported in the service query request. If device B supports, device B replies to device A with a message including the capabilities and services supported by device B.
[0115] Similarly, device C determines whether it meets the broadcast requirements of device A according to the service query request, for example, whether device C supports the capabilities and services required in the service query request. If device C does not support, device C will not reply to device A.
[0116] Device D determines whether it meets the broadcast requirements of device A according to the service query request, for example, whether device D supports the capabilities and services required in the service query request. If device D supports, device D replies to device A with a message including the capabilities and services supported by device D.
[0117] Device X determines whether it meets the broadcast requirements of device A according to the service query request, for example, whether device X supports the capabilities and services required in the service query request. If device X does not support, device X will not reply to device A.
[0118] Passive discovery: Passive discovery is that after the discovery end device passively subscribes to the service or capability information published by the surrounding devices, the discovery end device listens to the capability information or service information actively broadcast by the discovered device.
[0119] For example, Figure 5The present application provides a schematic diagram of a process in which a discovery end device discovers surrounding devices through a passive discovery method. Figure 5 In the example shown, the discovering end 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 device B, device C, device D, and device X, and device A can start discovery monitoring. Device B, device C, device D, and device X broadcast their own capability information and / or service information at different times. Device A can monitor the capability information and / or service information broadcast by device B, device C, device D, and device X, so that device A can obtain or discover the capability information and / or service information of surrounding devices.
[0121] Optionally, the messages broadcasted by device B, device C, device D, and device X may also carry capability information of each device.
[0122] Combine the following Figure 1 The scenario shown illustrates the method for discovering and connecting electronic devices provided by the present application. Figure 1 In the scenario shown, it is assumed that the first electronic device (smartphone 110) used by the user has capabilities such as BT, Wi-Fi, NFC, USB, Zigbee, and Cellular, where Wi-Fi can include two frequencies of 2.4GHz and 5GHz, represented by Wi-Fi (2.4GHz) and Wi-Fi (5GHz) respectively. The second electronic device in the home (large-screen device 120) has capabilities such as BT, Wi-Fi, USB, NFC, and Cellular. The smartphone 110 discovers the large-screen device 120 using active discovery. Assume that the smartphone 110 and the large-screen device 120 have been connected using USB. Figure 1 In the scenario shown, the smart phone can be understood as a discovery end device, and the large-screen device can be understood as a discovery end device or a scanning end device.
[0123] Figure 6 Shown is Figure 1 In the scenario shown, the present application provides a schematic flow chart of a method 300 for discovering and connecting an electronic device. Figure 6 As shown, the method 300 includes: S301 to S310.
[0124] S301, the user triggers the smart phone to actively discover surrounding devices. In the embodiment of the present application, the user can trigger the smart phone to actively discover surrounding devices through the following two operation modes:
[0125] The first operation method: Assume that the user needs to transfer files from a smartphone to a large-screen device. Figure 7 As shown in a in FIG, a user opens the "File Management" application on a smart phone, and the interface displayed is as follows Figure 7 As shown in b in FIG. 1 , the user selects the file to be shared (for example, file 1), clicks “Share”, and selects the sharing method. The interface displayed is as follows Figure 7 As shown in c in the figure, in the embodiment of the present application, the user can click the "Select All" button, which means that the user uses Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network to discover other devices at the same time. Optionally, the user can also select any number of methods from Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network according to their needs. Assuming that there is no USB connection between the smartphone and the large screen, the user can click the selection box under "Bluetooth", "Wi-Fi", "NFC", "Zigbee", and "Mobile Network" to select these discovery methods to discover other devices at the same time. After the user clicks the "Select All" button, the smartphone will use Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile networks to discover other devices around it. After the smartphone scans the surrounding devices, it displays a list of scanned devices to the user, and the device list contains the device identifiers of one or more devices. For example, the displayed device list can be as follows Figure 7 As shown in d in the figure. The user can select a device (for example, a large-screen device) from the device list as needed. After the user selects the large-screen device, the smart phone and the large-screen device will automatically select the best connection method from the connection methods supported by both devices to connect according to the service to be transmitted and the network environment, so as to transfer files.
[0126] The second operation method: Assume that the user's purpose is only to connect the smartphone and the large-screen device to facilitate the quick transfer of files when there is data or file sharing later. Figure 8 Click "Settings" on the interface shown in a, and the interface displayed is as follows Figure 8As shown in b, in the embodiment of the present application, the user can click the "Select All" start button, which means that the user uses Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network to discover other devices at the same time. Optionally, the user can also select any number of methods from Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network according to their needs. For example, assuming that there is no USB connection between the smartphone and the large screen, the user can click the start buttons corresponding to "Bluetooth", "Wi-Fi", "NFC", "Zigbee", and "Mobile Network" respectively, so as to select these discovery methods to discover other devices. After the user clicks the "Select All" button, the smartphone will use Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network to discover other devices around it. After the smartphone scans the surrounding devices, it displays the scanned device list to the user, and the device list contains the device identification of one or more devices. For example, the displayed device list can be as follows Figure 8 As shown in c in the figure. The user can select a device (for example, a large-screen device) from the device list as needed. After the user selects the large-screen device, the smart phone and the large-screen device will automatically select the best connection method from the connection methods supported by both devices according to the services to be transmitted and the network environment, thereby completing the connection between the smart phone and the large-screen.
[0127] Optionally, in the embodiment of the present application, Figure 8 After the device list is displayed as shown in c, Figure 8 As shown in d, the smartphone can also display the connection technologies or capabilities supported by each device in the displayed 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 embodiment of the present application, Figure 7 After the interface shown in c in the figure, the smartphone can also display the following Figure 8 In other words, Figure 7 The interface shown in d can be Figure 8 Replace the interface shown in d.
[0129] It should be understood that in the embodiment of the present application, in addition to the above-mentioned two operation modes, the user can also trigger the smartphone to actively discover surrounding devices through other operation modes, and the embodiment of the present application is not limited here.
[0130] In S302, after receiving the user's operation to trigger the smartphone to actively discover surrounding devices, the smartphone broadcasts or sends messages simultaneously through all its capabilities (BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc.), or multiple capabilities among all its capabilities. In this embodiment, for example, the smartphone uses BT, Wi-Fi, NFC, USB, Zigbee, and mobile network to broadcast or send service query requests (also referred to as broadcast messages) to surrounding devices at the same time. In other words, the smartphone broadcasts a service query request to surrounding devices via BT (for distinction, referred to as the first service query request). The smartphone broadcasts a service query request to surrounding devices via Wi-Fi (for distinction, called the second service query request), the smartphone sends a service query request to surrounding devices via USB (for distinction, called the third service query request), the smartphone broadcasts a service query request to surrounding devices via NFC (for distinction, called the fourth service query request), the smartphone broadcasts a service query request to surrounding devices via Zigbee (for distinction, called the fifth service query request), and the smartphone broadcasts a service query request to surrounding devices via a mobile network (i.e., cellular network (Cellular)) (for distinction, called the sixth service query request). These six service query requests are broadcast by the smartphone at the same time.
[0131] Optionally, in the embodiment of the present application, the six service query requests can be used to query the capabilities of the peripheral devices, or to query whether the peripheral devices have certain specific capabilities. On this basis, the six service query requests can also be used to query the service information of the peripheral devices, or to query whether the peripheral devices have certain specific service information, etc.
[0132] In the embodiment of the present application, six service query requests are sent by the smartphone at the same time. In the embodiment of the present application, "simultaneous transmission or simultaneous broadcasting" can be understood as within the time length of a time window, the smartphone uses multiple non-conflicting communication technologies to send or broadcast service query requests respectively within the time window (that is, the time periods for sending or broadcasting service query requests respectively using multiple non-conflicting communication technologies are overlapping in the time domain, which can be partially overlapping or completely overlapping, for example: multiple non-conflicting communication technologies can start sending or broadcasting service query requests at the same time). On this basis, within the time window, another communication technology is used to send or broadcast service query requests at the same time. If another communication technology conflicts with a certain communication technology used to send or broadcast service query requests within the time window, multiple conflicting communication technologies are used to send or broadcast service query requests in time-sharing within the time window. In other words, the "simultaneous transmission" in the example of the present application can be understood as: the smartphone needs to use multiple different communication technologies to send or broadcast service query requests simultaneously or in time-sharing within the time granularity of a time window.
[0133] Alternatively, in an embodiment of the present application, "simultaneous transmission or simultaneous broadcasting" can be understood as: using the first communication technology to send or broadcast the first service query request in the first time period, and using the second communication technology to send or broadcast the first service query request in the second time period. If the first communication technology and the second communication technology do not conflict (for example, there is no conflict in the channel, air interface timing, etc.), then the first time period and the second time period can overlap in the time domain (may be partially overlapped or completely overlapped). On this basis, using the third communication technology to send or broadcast the third service query request in the third time period, if the third communication technology conflicts with the first communication technology or the second communication technology (for example, there is a conflict in the channel, air interface timing, etc.), then the third time period and the first time period do not overlap in the time domain, or the third time period and the second time period do not overlap in the time domain. That is, "simultaneous transmission" can be understood as: the time periods for sending or broadcasting service query requests using multiple non-conflicting communication technologies are overlapping in the time domain (partially overlapping or completely overlapping), and the time periods for sending or broadcasting service query requests using conflicting communication technologies are not overlapping in the time domain.
[0134] In an embodiment of the present application, the first service query request also includes: Wi-Fi capability indication information, NFC capability indication information, USB capability indication information, Zigbee capability indication information and mobile network capability indication information. Among them, the Wi-Fi capability indication information is used to indicate that the smartphone also broadcasts the service query request using Wi-Fi. The NFC capability indication information is used to indicate that the smartphone also broadcasts the service query request using NFC. The USB capability indication information is used to indicate that the smartphone also sends the service query request using USB. The Zigbee capability indication information is used to indicate that the smartphone also broadcasts the service query request using Zigbee. The mobile network capability indication information is used to indicate that the smartphone also broadcasts the service query request using a cellular network.
[0135] Optionally, the first service query request further includes: BT capability indication information, where the BT capability indication information is used to indicate that the smart phone also broadcasts the service query request in a BT manner.
[0136] Similarly, the second service query request to the second service query request respectively carries indication information for indicating that the smart phone also utilizes other capabilities it has to simultaneously broadcast or send the service query request.
[0137] That is to say, the service query requests broadcasted in different ways respectively carry: indication information for indicating that the smart phone uses all other capabilities of the smart phone to broadcast or send the service query request simultaneously.
[0138] Optionally, in an embodiment of the present application, as another possible implementation method, BT capability indication information can also be used to indicate that the smartphone also has BT communication capability, Wi-Fi capability indication information can also be used to indicate that the smartphone also has Wi-Fi communication capability, and NFC capability indication information can also be used to indicate that the smartphone also has NFC communication capability. USB capability indication information can also be used to indicate that the smartphone also has USB communication capability. 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 it does not mean that the smartphone uses the communication capability to send or broadcast a service query request.
[0139] Optionally, in an embodiment of the present application, for example: if the user's smartphone supports Bluetooth communication capabilities, but the user turns off "Bluetooth" on the smartphone, in this case, the smartphone will not be able to broadcast service query requests via Bluetooth. However, in the service query request broadcast or sent using other communication technologies, Bluetooth capability indication information may be carried, and the Bluetooth capability indication information is used to indicate that the smartphone has Bluetooth communication capabilities. Alternatively, the Bluetooth capability indication information may not be carried in the service query request broadcast or sent using other communication technologies, that is, the opposite device will not be informed whether the smartphone supports Bluetooth communication capabilities.
[0140] Optionally, in the embodiment of the present application, in addition to the above-mentioned six service query requests respectively carrying other capability indication information, notifying the large-screen device that the smartphone also uses other capabilities to broadcast or send service query requests to the large-screen device, or the smartphone has other communication capabilities, other optional methods can also be used:
[0141] For example, as a possible implementation method: the rules are negotiated in advance between the smartphone and the large-screen device. For example, a field (such as an indication field) can be set in each query request, which is used to indicate whether the smartphone uses other capabilities to broadcast the service query request to the large-screen device, or whether the smartphone has some other communication capabilities. For example, the length of this field is 6 bits. The position of this field in each query request is fixed (for example, it is located in the nth field in each service query request), and both the smartphone and the large-screen device know in advance the position of the field and the meaning of each bit in the field.
[0142] For example, in a 6-bit field, the first bit indicates whether the smartphone broadcasts a service query request using BT, wherein the value of the bit is 1, indicating that the smartphone broadcasts the service query request using BT, and the value of the bit is 0, indicating that the smartphone does not broadcast the service query request using BT. Similarly, the second bit indicates whether the smartphone broadcasts a service query request using Wi-Fi, wherein the value of the bit is 1, indicating that the smartphone broadcasts the service query request using Wi-Fi, and the value of the bit is 0, indicating that the smartphone does not broadcast the service query request using Wi-Fi. The third bit indicates whether the smartphone broadcasts a service query request using NFC, wherein the value of the bit is 1, indicating that the smartphone broadcasts the service query request using NFC, and the value of the bit is 0, indicating that the smartphone does not broadcast the service query request using NFC. The fourth bit indicates whether the smartphone sends a service query request using USB, wherein the value of the bit is 1, indicating that the smartphone sends the service query request using USB, and the value of the bit is 0, indicating that the smartphone does not send the service query request using USB. The fifth bit indicates whether the smartphone has broadcast the service query request using the Zigbee method, where the value of the bit is 1, indicating that the smartphone has broadcast the service query request using the Zigbee method, and the value of the bit is 0, indicating that the smartphone has not broadcast the service query request using the Zigbee method. The sixth bit indicates whether the smartphone has broadcast the service query request using the Cellular method, where the value of the bit is 1, indicating that the smartphone has broadcast the service query request using the Cellular method, and the value of the bit is 0, indicating that the smartphone has not broadcast the service query request using the Cellular method. Smartphones and large-screen devices negotiate the indication rules of this field in advance. In this way, using this indication field, it is possible to indicate whether the smartphone is broadcasting the service query request at the same time using its other capabilities.
[0143] For another example, as another possible implementation method, the smartphone and the large-screen device can negotiate a rule in advance: different special strings (for example, a special string can be a specific sequence, which can be composed of at least one of numbers, letters or special characters) are used to represent different capabilities, and these different special strings may or may not exist in each query request. For example, there may be 6 different special strings, which represent BT, Wi-Fi, NFC, USB, Zigbee, and Cellular capabilities. If a special string exists in a query request, it means that the smartphone also uses the capability corresponding to the special string to broadcast a service query request to the large-screen device, or the smartphone also has the communication capability corresponding to the special string. If it does not exist, it means that the smartphone does not use the capability corresponding to the special string to broadcast a service query request to the large-screen device, or the smartphone does not have the communication capability corresponding to the special string. The smartphone and the large-screen device negotiate the indication rules of different special strings in advance. In this way, using these different special strings, it can be achieved to indicate whether the smartphone uses other capabilities it has to broadcast a service query request at the same time, or whether the smartphone has other communication capabilities.
[0144] In an embodiment of the present application, the six service query requests mentioned above also carry a random value (also referred to as a random code) respectively, and the random values carried by the six service query requests are all the same, and the random value is randomly generated by the smartphone. It should be understood that the smartphone can generate different random values at different times, and the 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 at the same time are the same, and the random values carried in service query requests sent at different times are different.
[0145] It should be understood that in the embodiments of the present application, when the smartphone broadcasts or sends messages simultaneously through all its capabilities (BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc.), since different capabilities or technologies have various corresponding protocol provisions, there may be conflicts in channels, air interface timing, etc. when broadcasting messages using multiple different technologies, that is, there may be interference between messages broadcast using different technologies. Therefore, when the 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: Conflict table when using different technologies to broadcast messages simultaneously
[0147]
[0148] Table 1 shows the conflict situation when using different technologies to broadcast messages simultaneously. As shown in Table 1, "conflict" in Table 1 means that there is signal interference (for example, channel interference or conflict in air interface timing, etc.) when using two different technologies to broadcast messages simultaneously, and it is necessary to use a time-sharing strategy to broadcast messages using these two technologies. "No conflict" means that there is no signal interference when using two different technologies to broadcast messages simultaneously, and messages can be broadcast simultaneously using these two technologies.
[0149] Specifically, since there is no signal interference between USB and NFC, and between BT (BLE is used as an example) and Wi-Fi, USB and NFC can always monitor and scan, that is, whether the smartphone uses other technologies to broadcast service query requests, USB and NFC can be used to send and broadcast service query requests respectively. Since there is 2.4GHz interference between BLE and Wi-Fi, when using BLE and Wi-Fi (2.4GHz) for broadcasting, a time-sharing strategy will be used to avoid air interface conflicts and broadcast on the negotiated designated channel.
[0150] It should be understood that in the embodiments of the present application, the time-sharing strategy involves the control of specific channels at the chip level. Specifically, a parallel discovery method is adopted on two or more non-conflicting technologies, that is, multiple non-conflicting technologies are used to broadcast device discovery messages at the same time, and a time-sharing strategy is adopted on two or more conflicting technologies or channels, that is, on two or more conflicting technologies or channels, device discovery messages are broadcast in time division.
[0151] In the embodiment of the present application, the time-sharing strategy will first synchronize the clock strategies of the multi-chips of the smart phone and the large-screen device, and plan the broadcast window strategy of the multi-chips of the smart phone and the scanning window strategy of the multi-chips of the large-screen device according to the synchronized clock strategies, wherein the duration of the broadcast window is shorter than the duration of the scanning window. The discovery device (smart phone) and the discovered device (large-screen device) interact with data packets on the broadcast window and the scanning window respectively, thereby achieving the purpose of using multiple technologies to simultaneously discover other devices.
[0152] The following uses BLE and Wi-Fi (2.4GHz) as examples to illustrate the time-sharing strategy when a smartphone uses BLE and Wi-Fi (2.4GHz) to broadcast service query requests. Fig. 9 The figure shows an example of BLE and Wi-Fi (2.4GHz) broadcasting service query requests in different time slots. Fig. 9 As shown, each small box in the first row represents a time slot, and the number in the small box represents the number of the time slot. Fig. 9The various time slots shown in 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 channel of Wi-Fi (2.4GHz), and a small box on the second row represents a channel of Wi-Fi (2.4GHz), and the number in the small box represents the channel number (Channel Sequence). A small box on the third row represents a channel of BLE, and the number in the small box represents the number of the BLE channel. Among them, for Wi-Fi (2.4GHz) technology, channel 1, channel 6 and channel 11 are broadcast channels. For BLE technology, channel 37, channel 38 and channel 39 are broadcast channels.
[0153] like Fig. 9 As shown, data can only be sent on a fixed channel of a certain technology (or capability) in each time slot, for example, in the first time slot, a service query request is broadcast on the first channel of Wi-Fi 2.4GHz, in the second time slot, a service query request is broadcast on the sixth channel of Wi-Fi 2.4GHz, and in the third time slot, a service query request is broadcast on the eleventh channel of Wi-Fi 2.4GHz. In the fourth time slot, a service query request is broadcast on the 37th channel of BLE, in the fifth time slot, a service query request is broadcast on the 38th channel of BLE, and in the sixth time slot, a service query request is broadcast on the 39th channel of BLE. In other words, when a smartphone simultaneously uses BLE and Wi-Fi (2.4GHz) to broadcast service query requests, in the 1st to 3rd time slots, only Wi-Fi (2.4GHz) technology is used to broadcast service query requests on different channels. In the 4th to 6th time slots, only BLE technology is used to broadcast service query requests on different channels, thereby realizing time-sharing broadcast messages of BLE and Wi-Fi (2.4GHz), and solving the problem of air interface conflict on the same frequency when smartphones simultaneously use BLE and Wi-Fi (2.4GHz) to broadcast service query requests.
[0154] For the situation in Table 1 where there is a conflict when using any two technologies to broadcast service query requests at the same time, you can also use Fig. 9 A similar method as shown is used to implement a time-sharing broadcast service query request, thereby solving the air interface conflict problem between different technologies.
[0155] In an embodiment of the present application, if the above six service query requests are used to query whether the peripheral devices have certain capabilities or services, the above six service query requests respectively carry: the name of the target device, the type of the target device, the target capability or target service that the target device needs to support. The target service may include the service name, service ID, service attributes, etc. of the target service. For example, the above six service query requests respectively carry: whether it has BT, Wi-Fi, USB, NFC, Cellular capabilities, and / or, whether it has file sharing services, printing, screen projection and other services.
[0156] Optionally, the above six service query requests may also carry: the smartphone's own capability information (for example, including: the smartphone name, the smartphone's device type, the smartphone's capabilities or service capabilities, etc.). If the above six service query requests do not carry the smartphone's own capability information, then after the six service query requests, the smartphone and the large-screen device need to perform additional broadcast message interaction so that the large-screen device obtains the smartphone's own capability information. Alternatively, the smartphone's own capability information is exchanged during the connection process between the smartphone and the large-screen device.
[0157] It should be understood that in the embodiment of the present application, the above six service query requests may be sent multiple times. For example, the above six service query requests are sent at a first moment, and at a certain moment after the first moment, the smart phone may repeatedly send the above six service query requests or any multiple of the above six service query requests. Optionally, the smart phone may periodically send the above six service query requests.
[0158] In S303, the large-screen device will select one or more technologies from BT, Wi-Fi, USB, NFC, and Cellular to monitor (also called scan) the messages broadcast by the surrounding devices according to its own conditions. For example, the large-screen device can select one or more capabilities from its supported capabilities (from BT, Wi-Fi, USB, NFC, and Cellular) to monitor according to its supported capabilities, latency requirements, and power consumption.
[0159] In S303, since the large-screen device will select one or more technologies from BT, Wi-Fi, USB, NFC, and Cellular to monitor (scan) the messages broadcast by surrounding devices at the same time, there will also be conflicts between different technologies in channels, air interface timing, etc. For example, when the large-screen device uses BLE and Wi-Fi (2.4GHz) to scan or monitor at the same time, the large-screen device can reuse the current existing scanning technology and scan on Wi-Fi (2.4GHz) and BLE chips at the same time, or it can use different technologies to scan according to the time-sharing strategy described in S302, that is, use Fig. 9 The time slot relationship is shown, and different technologies are used to scan in different time slots.
[0160] For large-screen devices, Fig. 9 Each time slot shown in the figure may be referred to as a scanning time slot. For example, in the first time slot, Wi-Fi scanning is performed on the first channel of Wi-Fi 2.4 GHz, in the second time slot, Wi-Fi scanning is performed on the sixth channel of Wi-Fi 2.4 GHz, and in the third time slot, Wi-Fi scanning 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 the large-screen device uses BLE and Wi-Fi (2.4GHz) to scan at the same time, only Wi-Fi (2.4GHz) is used for Wi-Fi scanning in the 1st to 3rd time slots, and only BLE is used for BLE scanning in the 4th to 6th time slots, thereby realizing time-sharing scanning of BLE and Wi-Fi (2.4GHz) and solving the problem of air interface conflict when the large-screen device uses BLE and Wi-Fi (2.4GHz) to scan at the same time.
[0161] Optionally, in the embodiment of the present application, when the large-screen device scans according to the above-mentioned time slot sequence, the scanning can be divided into two stages, namely, a rough matching stage and a precise matching stage:
[0162] Rough matching stage: When the large-screen device (the discovered device) is scanning, without time slot synchronization with any discovered device, in order to make it easier for the large-screen device to scan the service query request broadcast by the smartphone, the length of the scanning time slot of the large-screen device needs to be twice or more than twice the length of the broadcast time slot of the smartphone.
[0163] Precise matching stage: When the large-screen device scans the service query request broadcast by the smartphone, it will synchronize the time slot with the smartphone. At this time, the scanning time slot of the large-screen device can be the same length as the scanning time slot of the smartphone.
[0164] For example, in the embodiment of the present application, the time length of the broadcast time slot of the smartphone can be 1ms, and the time length of the scanning time slot of the large-screen device can be 2ms, so that the large-screen device as a scanning end device can more easily discover more broadcasting devices. After the large-screen device and the smartphone complete the time slot synchronization, the time length of the scanning time slot of the large-screen device can be reduced from 2ms to 1ms, so that it is consistent with the length of the broadcast time slot of the smartphone, which facilitates the 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 monitors or scans all or part of the six service query requests broadcast by the smartphone, it is assumed that the large-screen device monitors the first service query request, the second service query request, the third service query request, the fourth service query request, and the sixth service query request. The large-screen device determines the media access control (MAC) address corresponding to the BT of the smartphone according to the first service query request, hereinafter referred to as the BT MAC address. According to the second service query request, the MAC address corresponding to the Wi-Fi of the smartphone is determined, hereinafter referred to as the Wi-Fi MAC address. According to the third service query request, the MAC address corresponding to the USB of the smartphone is determined, hereinafter referred to as the USB MAC address. According to the fourth service query request, the MAC address corresponding to the NFC of the smartphone is determined, hereinafter referred to as the NFC MAC address. According to the sixth service query request, the MAC address corresponding to the cellular network of the smartphone is determined, hereinafter referred to as the MAC address of the cellular network, which can be understood as the smartphone network protocol (internet protocol, IP address). Furthermore, the large-screen device determines that the first service query request, the second service query request, the third service query request, the fourth service query request, and the sixth service query request are all from the same device based on the random values respectively carried by the first service query request, the second service query request, the third service query request, the fourth service query request, and the sixth service query request. The large-screen device can obtain the network identification information of the smartphone based on this information, and the network identification information includes: BT MAC, Wi-Fi MAC, USB MAC, NFC MAC, IP, that is, the network identification information includes five parameters of the smartphone, and the five parameters are: the BT MAC address of the smartphone, the Wi-Fi MAC address of the smartphone, the USB MAC address of the smartphone, the NFC MAC address of the smartphone, and the IP address of the smartphone. The network identification information is used to uniquely identify the smartphone.
[0166] It should be understood that in an embodiment of the present application, the network identification information of an electronic device is a set or combination of multiple addresses of the electronic device, wherein an address of an electronic device (for example, a BT MAC address) is an element in the network identification information. The network identification information may include multiple elements. Moreover, the number of elements included in the network identification information is expandable, that is, it may be dynamically changed. For example: the network identification information of the first electronic device may include four elements, namely: 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, namely: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, and IP address.
[0167] Optionally, in the example of the present application, the network identification information of the electronic device can be represented in a set or combination manner.
[0168] It should be understood that in the embodiment of the present application, as another possible implementation method, the above-mentioned first service query request to the fifth service query request can also carry the IP address of the smartphone, in which case the large-screen device can also obtain the IP address of the smartphone. Alternatively, if the first service query request to the fifth service query request do not carry the IP address of the large-screen device, then after the large-screen device receives the first service query request to the fifth service query request, the large-screen device can also send a broadcast message to the smartphone to inquire about the IP address and other capability information of the smartphone, thereby obtaining the IP address of the smartphone.
[0169] In the process of the large-screen device discovering other devices at the same time, since the smartphone repeatedly sends service query requests, the next time the smartphone sends one or more of the above six service query requests, since the large-screen device has obtained and saved the network identification information of the smartphone, when the large-screen device receives one or more service query requests sent by the smartphone next time, if the one or more service query requests carry the same random value, the large-screen device can determine that the multiple service query requests are all from the same device (for example, called the first device) based on the same random values carried in the multiple service query requests. Furthermore, based on the addresses carried by different service query requests in the multiple service query requests, for example, BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, or IP address, the large-screen device compares the two based on this information and the previously stored network identification information of the smartphone (for example, by calculating the distance of data by vector), and can determine that the first device and the smartphone are the same device, that is, perform device deduplication processing to filter out duplicate information. The device is identified by its network identification information. The device's network identification information is changeable and can be dynamically expanded and updated according to changes in the capabilities supported by the device. Therefore, 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 in the prior art that the device is easily tracked when its unique ID is used to identify the device, thereby improving the security of the device.
[0170] Alternatively, as another possible implementation method, during the process of the large-screen device discovering other devices at the same time, since the smartphone repeatedly sends service query requests, the next time the smartphone sends one or more service query requests, since the large-screen device has obtained and saved the network identification information of the smartphone, when the large-screen device receives one or more service query requests sent by the smartphone next time, if the one or more service query requests do not carry random values, the large-screen device uses the addresses carried in the one or more service query requests, such as one or more of the BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, or IP address, and compares the two based on the address information and the previously stored network identification information of the smartphone, and can also determine that the one or more service query requests also come from the smartphone, that is, performs deduplication processing on the device, thereby filtering out duplicate information.
[0171] It should be understood that in the example of the present application, during different device discovery processes of the large-screen device, for example, the large-screen device performs device discovery every 5 minutes, and the device discovered the previous time and the device discovered the next time also need to be deduplicated, and the broadcast content of the same device is identified as the same device. The deduplication method is consistent with the above process and will not be repeated here for the sake of brevity.
[0172] In an embodiment of the present application, when the large-screen device receives multiple service query requests and identifies that the multiple service query requests are all from the same smart phone, the large-screen device can share the information carried by the multiple service query requests. For example, in the process of discovering devices at the same time, it is assumed that: after the large-screen device simultaneously receives service query requests broadcast by the smart phone using BT and Wi-Fi respectively, since the service query request broadcast by BT and the service query request broadcast by Wi-Fi carry different amounts of data, the service query request broadcast by Wi-Fi carries a large amount of data, and the service query request broadcast by BT carries a small amount of data. After the large-screen device receives the service query request broadcast by the smart phone using Wi-Fi, it can filter and deduplicate the information carried by the service query request broadcast by Wi-Fi, so as to avoid multiple interactions between the smart phone and the large-screen device using BT, thereby saving signaling overhead and improving resource utilization.
[0173] For another example, in the process of discovering devices at different times: if the device scanned by the large-screen device after the large-screen device and the device scanned by the large-screen device before the large-screen device are matched through the grid identifier of the device and are the same device after matching, the device scanned by the large-screen device after the large-screen device can share the device capabilities or service information scanned by the large-screen device before. The large-screen device only needs to synchronize some device capabilities or service information, and does not need to fully synchronize the device capabilities and service information, thereby saving signaling overhead and improving resource utilization.
[0174] In S305, after the large-screen device monitors all or part of the six service query requests broadcast by the smartphone, it can select one or more capabilities of the large-screen device to reply to the smartphone (i.e., reply response information to the smartphone). For example, the large-screen device will make a selection based on its own device capabilities and the requirements of the scenario. Since the large-screen device is a normally powered device, its Wi-Fi and BLE can be normally turned on. After receiving multiple service query requests broadcast by the smartphone, it can select Wi-Fi and BLE to reply to the broadcast message to the smartphone at the same time. For another example, the large-screen device can also select BLE and Wi-Fi from BT (BLE), Wi-Fi, USB, NFC, Cellular and other capabilities based on the power consumption of different capabilities, the delay of different capabilities, etc., that is, use BLE and Wi-Fi to reply to the smartphone at the same time.
[0175] Assumption: The large-screen device ultimately chooses Wi-Fi and BLE to reply to messages to the smartphone at the same time.
[0176] Among them, the first message replied to the smart phone in the form of broadcasting using the BLE method includes: Wi-Fi capability indication information, USB capability indication information, NFC capability indication information, Cellular capability indication information and a random value (or it can also be called a random code). The Wi-Fi capability indication information is used to indicate whether the large-screen device has Wi-Fi communication capability or not. The USB capability indication information is used to indicate whether the large-screen device has USB communication capability or not, the NFC capability indication information is used to indicate whether the large-screen device has NFC communication capability or not, and the Cellular capability indication information is used to indicate whether the large-screen device has cellular network communication capability or not. The random value is generated by the large-screen device and is used to uniquely identify the large-screen device, that is, the random value is used to uniquely identify a device. The 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, and the random value is used to uniquely identify the large-screen device. The random value carried in multiple messages sent by the large-screen device at the same time is the same, and the random value carried in the messages sent by the large-screen device at different times is different.
[0177] Optionally, the first message may further include: BLE capability indication information, where the BLE capability indication information is used to indicate that the large-screen device also has BLE communication capability. Alternatively, the first message may also not include: BLE capability indication information.
[0178] The second message replied to the smart phone in the form of broadcasting by using Wi-Fi includes: BT capability indication information, USB capability indication information, NFC capability indication information, Cellular capability indication information and a random value (or also called a random code). The BT capability indication information is used to indicate whether the large-screen device has BT communication capability or not. The functions of other capability indication information are the same 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. The random value is the same as the random value in the first message.
[0179] Optionally, the second message may further include: Wi-Fi capability indication information, where the Wi-Fi capability indication information is used to indicate that the large-screen device also has Wi-Fi communication capability. Alternatively, the first message may also not include: Wi-Fi capability indication information.
[0180] Optionally, in an embodiment of the present application, in addition to the above-mentioned method of respectively carrying other capability indication information in the first message and the second message to notify the smart phone that the large-screen device has other capabilities, other optional methods can also be used.
[0181] For example, as a possible implementation method: the smartphone and the large-screen device negotiate the rules in advance. For example, a field can be set in the reply message (first message and second message) to indicate that the large-screen device has other capabilities. For example, the length of the field is 5 bits. The position of the field is fixed in each message, and both the smartphone and the large-screen device know in advance the position of the field and the meaning of each bit in the field.
[0182] In the 5-bit field, the first bit indicates whether the large-screen device has BLE communication capability, where the value on the bit is 1, indicating that the large-screen device has BLE communication capability, and the value on the bit is 0, indicating that the large-screen device does not have BLE communication capability. Similarly, the second bit indicates whether the large-screen device has USB communication capability, where the value on the bit is 1, indicating that the large-screen device has USB communication capability, and the value on the bit is 0, indicating that the large-screen device does not have USB communication capability. The third bit indicates whether the large-screen device has NFC communication capability, where the value on the bit is 1, indicating that the large-screen device has NFC communication capability, and the value on the bit is 0, indicating that the large-screen device does not have NFC communication capability. The fourth bit indicates whether the large-screen device has Wi-Fi communication capability, where the value on the bit is 1, indicating that the large-screen device has Wi-Fi communication capability, and the value on the bit is 0, indicating that the large-screen device does not have Wi-Fi communication capability. The fifth bit indicates whether the large-screen device has cellular communication capabilities. If the value of the bit is 1, it means that the large-screen device has cellular communication capabilities, and if the value of the bit is 0, it means that the large-screen device does not have cellular communication capabilities. The large-screen device and the smart phone negotiate the indication rules of this field in advance. In this way, using this indication field, it is possible to indicate that the large-screen device also has other capabilities.
[0183] For another example, as another possible implementation method: the large-screen device and the smart phone can negotiate a rule in advance: use different special character strings (for example: a character string can be a specific sequence, and the sequence can be composed of at least one of numbers, letters or special characters) to represent different capabilities. In addition, these different special character strings may or may not exist in each reply message (first message and second message). For example, there may be 5 different special character strings, and the 5 different special character strings respectively represent BT communication capability, Wi-Fi communication capability, NFC communication capability, USB communication capability, and Cellular communication capability. If a special character string exists in a certain message, it means that the large-screen device also has the communication capability corresponding to the special character string. If it does not exist, it means that the large-screen device does not have the communication capability corresponding to the special character string. The large-screen device and the smart phone negotiate the indication rules of special character strings in advance. In this way, using these different special character strings, it is possible to indicate that the large-screen device also has other communication capabilities.
[0184] It should be understood that in the examples of this application, for example: if the large-screen device supports Bluetooth communication capabilities, but the "Bluetooth" on the large-screen device is in the off state, in this case, the large-screen device will not be able to reply to messages to the smartphone via Bluetooth. However, the large-screen device can carry Bluetooth capability indication information in the messages broadcast or sent using other communication technologies to indicate that the large-screen device has Bluetooth communication capabilities. Alternatively, the messages broadcast or sent using other communication technologies may not carry Bluetooth capability indication information, that is, the peer device (smartphone) will not be informed whether the large-screen device supports Bluetooth communication capabilities.
[0185] Optionally, the first message and the second message may also carry: other capabilities or service information of the large-screen device (for example, including: the name of the large-screen device, the device type of the large-screen device, etc.). If the first message and the second message do not carry other capabilities or service information of the large-screen device, then after the first message and the second message, the large-screen device and the smart phone need to interact with additional broadcast messages so that the smart phone can obtain other capabilities or service information of the large-screen device. Alternatively, the smart phone and the large-screen device interact with other capabilities or service information of the large-screen device during the connection process.
[0186] In an embodiment of the present application, if the service query request broadcast by the smart phone is used to query the target capabilities and target service information of the surrounding devices (for example, one or more of BT, Wi-Fi, USB, NFC, Cellular, file sharing services and screen projection services, etc.), the large-screen device needs to match the capabilities and service information of the device, that is, the large-screen device needs to determine whether the large-screen device meets the target capabilities and target services according to the target capabilities or target service information carried in the service query request. If the target capabilities and target services are met, the first message and the second message are replied to the smart phone, and the first message and the second message can also carry indication information for indicating that the large-screen device has the target capabilities or detailed information of the target services. For example, there is indication information in the first message and the second message, respectively, and the indication information is used to indicate that the large-screen device has BT, Wi-Fi, USB, NFC, Cellular and other capabilities, and supports file sharing services and screen projection services, etc. If the target capabilities or target services are not met, the large-screen device will not reply to the first message and the second message to the smart phone. Alternatively, if the target capabilities or target services are not met, the large-screen device will also reply to the smart phone with the first message and the second message, and the first message and the second message include: indication information for indicating that the target capabilities or target services are not present.
[0187] In S306, after receiving the first message replied by the large-screen device in BT mode and the second message replied in Wi-Fi mode, the smart phone will also obtain the network identification information of the large-screen device. Specifically, the smart phone can determine the BT MAC address of the large-screen device according to the first message, and determine the Wi-Fi MAC address of the large-screen device according to the second information. Optionally, the smart phone can also obtain the IP address of the large-screen device, and the smart phone determines that the first message and the second message are from the same smart phone according to the random values carried in the first message and the second message. The smart phone can obtain the network identification information of the large-screen device based on this information, and the network identification information includes: BT MAC, Wi-Fi MAC. IP. The network identification information is used to uniquely identify the large-screen device. Optionally, if the smart phone does not obtain the IP address on the large screen, the network identification information includes: BT MAC, Wi-Fi MAC. That is, the network identification information of the large-screen device includes two parameters of the large-screen device, which are: the BT MAC address of the large-screen device and the Wi-Fi MAC address of the large-screen device. The network identification information of the large-screen device is used to uniquely identify the large-screen device.
[0188] Optionally, in an embodiment of the present application, the first message and the second message mentioned above may respectively carry the IP address of the large-screen device. In this case, the smart phone can obtain the IP address of the large-screen device.
[0189] Alternatively, if the first message and the second message do not carry the IP address of the large-screen device, after the large-screen device replies to the first message and the second message, the smart phone can also send a broadcast message to the large-screen device to inquire about the IP address of the large-screen device, thereby obtaining the IP address of the large-screen device.
[0190] In the process of the smartphone discovering other devices at the same time, since the smartphone repeatedly sends the above-mentioned six service query requests, the large-screen device will also repeatedly reply to the smartphone. After the smartphone receives the reply information from the large-screen device next time, since the smartphone has obtained and saved the network identification information of the smartphone, the next time the smartphone receives one or more messages sent by the large-screen device in different ways (for example, one or more ways of BT, Wi-Fi, USB, NFC, Cellular), if the one or more messages carry the same random value, the smartphone can determine that one or more messages are from the same device (for example, called the second device) based on the same random values carried in the one or more messages received, because the same random values carried in one or more messages are the same. Furthermore, based on the addresses carried in one or more messages, for example: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC The smartphone can compare multiple MAC addresses and IP addresses based on this information and the previously stored network identification information of the large-screen device (for example, by calculating the distance of data through vectors), and then determine that the second device and the large-screen device are the same device, that is, deduplicate the devices. The network identification information of the device is used to deduplicate the device. The network identification information of the device can be changed and can be dynamically expanded and updated according to changes in the capabilities supported by the device. Therefore, the network identification information of the device can be dynamically expanded. Using the network identification information of the device to identify the device can effectively prevent the device ID information from being tracked and improve the security of the device.
[0191] Alternatively, as another possible implementation method, the next time the smartphone receives one or more messages sent by the large-screen device using different methods (for example, one or more of BT, Wi-Fi, USB, NFC, and Cellular), if the one or more messages do not carry random values, the smartphone can use the addresses carried in the one or more messages, such as one or more of the BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, and IP address. The smartphone can compare the two based on the address information and the network identification information of the large-screen device stored previously, and can also determine that the second device and the large-screen device are the same device, that is, perform device deduplication processing.
[0192] It should be understood that in the present application example, in the process of device discovery of different times of the smartphone, for example, the smartphone discovers the device once every 5 minutes, the device discovered in the previous time and the device discovered in the next time also need to be deduplicated, and the broadcast content of the same device is identified as the same device. The deduplication method is consistent with the above process, and for the sake of simplicity, it will not be repeated here.
[0193] It should be understood that in the embodiment of the present application, since in S302, the smartphone uses a broadcast method and multiple methods to query the surrounding broadcast services, in S306, in addition to receiving messages replied by the large-screen device, the smartphone may also receive messages replied by other devices. After the smartphone receives messages replied by other devices, it can also obtain and store the network identification information corresponding to the other devices to uniquely identify a device. The smartphone uses the network identification information to deduplicate the device after receiving multiple messages replied by the device.
[0194] It should also be understood that in S306, after the smartphone receives the first message replied by the large-screen device using BT and the second message replied using Wi-Fi, and obtains the network identification information of the large-screen device, the large-screen device recognizes that the first message and the second message are both from the large-screen device. Therefore, the smartphone can merge and share the contents of the first message and the second message (such as the device information, capability information, resolution, bit rate, decoding rate, transmission data packet size, etc. of the large-screen device), thereby avoiding the smartphone discovering the large-screen device using BT and negotiating capabilities with the large-screen device through BT. When the smartphone has a Wi-Fi-based service, the smartphone also needs to discover the large-screen device using Wi-Fi and negotiate capabilities with the large-screen device, thereby reducing signaling interaction, improving resource utilization, and improving the user experience of distributed services.
[0195] For example, in the same device discovery process, suppose that: when the smartphone receives messages from the large-screen device using BT and Wi-Fi respectively, since the amount of data carried by the messages sent using BT and Wi-Fi is different, the amount of data carried by the messages sent using Wi-Fi is large, and the amount of data carried by the messages sent using BT is small. After the smartphone receives the messages sent by the large-screen device using Wi-Fi, it can filter and deduplicate the content of the messages sent using Wi-Fi. This can avoid multiple interactions between the smartphone and the large-screen device using BT, thereby saving signaling overhead and improving resource utilization.
[0196] For example, in the process of discovering devices at different times: if the device discovered by the smartphone last time and the device discovered by the smartphone last time are matched through the grid identifier and are the same device after matching, the device discovered by the smartphone last time can share the device capabilities or service information discovered by the smartphone before. The smartphone only needs to synchronize some device capabilities or service information, and does not need to fully synchronize the device capabilities and service information, thereby saving signaling overhead and improving resource utilization.
[0197] In S306, the smart phone performs deduplication processing on the device information discovered by the multiple wireless and wired technologies (capabilities), and displays the identifiers of the multiple different devices remaining after the deduplication processing to the user, that is, displays a device list to the user. For example, the display interface can be as follows Figure 8 As shown in d.
[0198] In S307 , the user may select a large-screen device from a list of multiple devices as needed, and then connect to the large-screen device.
[0199] It should be understood that in S307, in addition to the user manually selecting the target device to be connected from the multiple device lists, 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 a device with a preset MAC address, etc. This embodiment of the application is not limited.
[0200] S308, after the user selects the large-screen device, the smart phone sends a connection request to the large-screen device. In the embodiment of the present application, the connection request includes: standard request information defined in the protocol corresponding to the optimal one or more connection modes (such as Wi-Fi, Bluetooth, etc.), for example, it may include information such as a connection address, a connection window, and security requirements.
[0201] It should be understood that in S308, the smartphone will select one or more optimal methods from BT, Wi-Fi, NFC, USB, Zigbee, and mobile networks to connect to the large-screen device based on its own supported capabilities and the capabilities supported by the peer device (large-screen device), and further, based on the business information that needs to be transmitted.
[0202] Optionally, as a possible implementation method, in S308, a connection strategy may be predefined, for example, when both the smartphone and the large-screen device support USB, Wi-Fi (5GHz), Wi-Fi P2P (5GHz), Wi-Fi (2.4GHz), Wi-Fi P2P (2.4GHz), BR / EDR, BLE and other capabilities, for large-bandwidth services, in near-field transmission, different capabilities are sorted in order of priority from high to low, and the order is: USB>Wi-Fi (5GHz)>Wi-Fi P2P (5GHz)>Wi-Fi (2.4GHz)>Wi-Fi P2P (2.4GHz)>BR / EDR>BLE. In far-field transmission, different capabilities (i.e., technologies) are sorted in order of priority from high to low, and the order is: Ethernet>Wi-Fi>Cellular. When the smartphone and the large-screen device are connected, the smartphone can select the highest priority method among the capabilities supported by both the smartphone and the large-screen device according to the priorities of the above different capabilities to connect with the large-screen device. Alternatively, the first several methods with higher priorities are selected to connect with the large-screen device.
[0203] In the present application example, as multiple business transmissions are connected between the smartphone and the large-screen device, the smartphone can monitor the communication delay in each connection process, the bandwidth information of each connection process, etc. during the multiple connections, dynamically adjust the subsequent method of establishing a connection with the large-screen device, and dynamically adjust the priority order of different capabilities.
[0204] In S309, after the large-screen device receives the connection request sent by the smart phone, it determines the connection method carried in the connection request (for example, any one of BT, Wi-Fi, USB, NFC, and Cellular) based on the information carried in the connection request, and establishes a communication connection between the large-screen device and the smart phone based on the connection method.
[0205] Optionally, in S309, as a possible implementation method, it is assumed that: the smartphone supports Bluetooth communication capability, and "Bluetooth" on the smartphone is turned on. The large-screen device also supports Bluetooth communication capability, but "Bluetooth" on the large-screen device is turned off. Moreover, the smartphone has clearly learned that the large-screen device supports Bluetooth communication capability, or the smartphone is not sure whether the large-screen device supports Bluetooth communication capability, and the user hopes to use Bluetooth to establish a connection between the smartphone and the large-screen device. In this case, the connection request received by the large-screen device carries the required connection address, connection window, security requirements and other information for the Bluetooth connection. According to the connection request, the large-screen device first automatically turns on "Bluetooth", or the large-screen device prompts the user to turn on "Bluetooth" of 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 capability, or the large-screen device supports Bluetooth communication capability but is temporarily not allowed to turn on "Bluetooth", the large-screen device can prompt the user: the large-screen device does not support Bluetooth connection temporarily. Optionally, the large-screen device will not respond to the connection request sent by the smartphone. Alternatively, the large-screen device can also reply to the smartphone with a message to notify the smartphone that the large-screen device temporarily does not support 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.
[0206] Optionally, in S309, as another possible implementation, if the large-screen device supports Bluetooth communication capability, and "Bluetooth" on the large-screen device is already turned on. The smartphone also supports Bluetooth communication capability, but "Bluetooth" on the smartphone is turned off, and the user hopes to use Bluetooth to establish a connection between the smartphone and the large-screen device. In this case, the smartphone will prompt the user to turn on the "Bluetooth" of the smartphone. After the "Bluetooth" of the smartphone is turned on, the connection request sent by the smartphone to the large-screen device will carry the required connection address, connection window, security requirements and other information of the Bluetooth connection. In this case, the smartphone can establish a Bluetooth connection with the large-screen device. If "Bluetooth" on the smartphone is turned off, and "Bluetooth" on the smartphone cannot be turned on temporarily, and the user hopes to use Bluetooth to establish a connection between the smartphone and the large-screen device. In this case, the smartphone will prompt the user: the smartphone does not support Bluetooth connection temporarily. The connection request sent by the smartphone to the large-screen device will not carry the required connection address, connection window, security requirements and other information of the 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 method, it is assumed that: the user is using a smart phone to transfer video files to other devices via Wi-Fi. The smart phone will combine the usage of all communication technologies currently supported by the smart phone and select one or more communication technologies other than the Wi-Fi communication method (such as Bluetooth, etc.) to establish a connection with the large-screen device. The connection request sent by the smart phone to the large-screen device will not carry the required connection address, connection window, security requirements and other information for the Wi-Fi connection. In this case, the smart phone 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 the smart phone and the large-screen device.
[0208] Optionally, in S309, as another possible implementation method, it is assumed that: the user is using a large-screen device and is transferring files to another electronic device using Wi-Fi. The large-screen device will combine the usage of all communication technologies currently supported by the large-screen device and select one or more communication technologies (such as Bluetooth, etc.) from communication technologies other than Wi-Fi communication methods according to the connection request sent by the smartphone to establish a communication connection with the large-screen device. Optionally, the large-screen device can also reply to the smartphone with information to notify the smartphone that the large-screen device does not support Wi-Fi connection temporarily. In this case, even if the connection request sent by the smartphone to the large-screen device carries the required connection address, connection window, security requirements and other information 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 the smartphone and the large-screen device.
[0209] It should be understood that in the embodiment of the present application, multiple connections of different technologies can be established and exist between the smart phone and the large-screen device at the same time. For example, a BT connection and a Wi-Fi connection can exist between the smart phone 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 smart phone, the smart phone can transmit a service data stream to the large-screen device, and data communication between the two begins.
[0211] It should be understood that in the embodiment of the present application, when there are multiple connections between the smart phone and the large-screen device at the same time, the smart phone can select the best one, or select multiple ones at the same time to transmit data to the large-screen device.
[0212] The method for discovering and connecting electronic devices provided by the present application utilizes all the technologies (capabilities) of discovering devices possessed by the same electronic device or multiple technologies (capabilities) of discovering devices to actively broadcast or send messages at the same time, so as to meet the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and improve user experience. In addition, using the network identifier of the device to identify a device can avoid the problem that the unique device ID commonly used in the industry is easy to be tracked when identifying the device, and can effectively prevent the device ID information from being tracked, improve the security of the device, and meet the dynamic change of the network identifier when the device capability is dynamically changing. Further, the network identifier of the device is used to deduplicate the device, thereby filtering out duplicate information, so that multiple discovery and connection technologies can be used in parallel, improving the efficiency of device discovery. In addition, when connecting a device, the supported capabilities of the peer device can be obtained, so that the most optimized connection technology and connection capability can be selected according to the business and scenario for connection, thereby improving the user experience.
[0213] Fig.10 Shown is Figure 2 In the scenario shown, the present application provides a schematic flow chart of a method 400 for discovering and connecting an electronic device. Figure 2 In the scenario shown, it is assumed that the smartphone 210 used by the user has BT, Wi-Fi, NFC, USB, Cellular and other capabilities, wherein Wi-Fi can include two frequencies of 2.4GHz and 5GHz, represented by Wi-Fi (2.4GHz) and Wi-Fi (5GHz) respectively. The vehicle-mounted device 220 supports multiple capabilities such as BT, Wi-Fi, USB and others. The smartphone 210 can simultaneously monitor the messages broadcast by surrounding devices through multiple capabilities such as BT, Wi-Fi, NFC, USB, Cellular and others. The vehicle-mounted device 220 has BT, Wi-Fi and USB capabilities, and the vehicle-mounted device 220 can use the broadcast capabilities of BT, Wi-Fi and USB to allow the smartphone 210 to discover the existence of the vehicle-mounted device 220, thereby completing the connection and data communication between the smartphone 210 and the vehicle-mounted device 220. The smartphone 210 discovers the vehicle-mounted device 220 using a passive discovery method. Assume that the smartphone 210 and the vehicle-mounted device 220 have been connected using USB. The smartphone can be understood as a discovery-end device, and the large-screen device can be understood as a discovery-end device or a scanning-end device. As Fig.10 As shown, the method 400 includes: S401 to S408.
[0214] S401, the smart phone subscribes to or monitors the service or capability information published by the vehicle-mounted device.
[0215] S402, the vehicle-mounted device actively sends and broadcasts its own device or service information. Specifically, the vehicle-mounted device can use all its capabilities (BT, Wi-Fi, NFC, USB, etc.), or multiple capabilities of all its capabilities to broadcast or send messages at the same time. The messages broadcast or sent in different ways carry the capability information of the vehicle-mounted device, and further, can also carry the service information of the vehicle-mounted device (for example, including: the name of the vehicle-mounted device, the device type of the vehicle-mounted device, and the vehicle-mounted device supports file sharing, screen projection and other services).
[0216] Assume that the vehicle-mounted device uses BT, Wi-Fi, NFC, and USB to broadcast or send messages simultaneously.
[0217] The first message broadcasted by BT carries: Wi-Fi capability indication information, NFC capability indication information, and USB capability indication information. Among them, the Wi-Fi capability indication information is used to indicate that the vehicle-mounted device also broadcasts messages by Wi-Fi, the NFC capability indication information is used to indicate that the vehicle-mounted device also broadcasts messages by NFC, and the USB capability indication information is used to indicate that the vehicle-mounted device also sends messages by USB.
[0218] Optionally, the first message further includes: BT capability indication information, where the BT capability indication information is used to indicate that the vehicle-mounted device also broadcasts the message in a BT manner.
[0219] Similarly, the messages sent or broadcasted respectively by using Wi-Fi, NFC and USB respectively carry information indicating that the vehicle-mounted device also broadcasts or sends messages simultaneously by using other methods.
[0220] That is to say, the messages broadcast in different ways respectively carry: indication information for indicating that the vehicle-mounted device uses all other capabilities it has to broadcast or send messages simultaneously.
[0221] Optionally, in an embodiment of the present application, as another possible implementation method, 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, and the NFC capability indication information can also be used to indicate that the vehicle-mounted device also has NFC communication capability. 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 the communication capability to send or broadcast a message.
[0222] Optionally, in the embodiment of the present application, in addition to carrying other capability indication information in the above four messages, in addition to notifying the vehicle-mounted device that the smartphone has also used other capabilities to broadcast or send service query requests to the vehicle-mounted device, other optional methods can also be used. The specific scheme is similar to that in method 300, and the corresponding description can refer to the relevant description in S302 in method 300. For the sake of brevity, it will not be repeated here.
[0223] In an embodiment of the present application, the above-mentioned four messages also carry a random value (also called a random code) respectively. The random values carried by the six service query requests are 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 the embodiment of the present application, when the vehicle-mounted device broadcasts messages simultaneously through all its capabilities (BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc.), since different capabilities or technologies have various corresponding protocol regulations, there may be conflicts in channels, air interface timing, etc. when using multiple different technologies to broadcast messages, that is, there may be interference between messages broadcast by different technologies. 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 used. Its specific scheme is similar to that in method 300, and the corresponding description can refer to the relevant description in S302 in method 300, which will not be repeated here for the sake of brevity.
[0225] It should be understood that in the embodiment of the present application, the above four messages may be sent multiple times. For example, the above four messages are sent at a first moment, and at a certain moment after the first moment, the vehicle-mounted device may repeatedly send the above four messages or any multiple of the above four messages. Optionally, the vehicle-mounted device may periodically send the above four messages.
[0226] In S403, the smartphone will select one or more technologies from BT, Wi-Fi, USB, NFC, and Cellular to monitor the messages broadcast by surrounding devices according to its own conditions. For example, the smartphone can select one or more capabilities from its supported capabilities (in BT, Wi-Fi, USB, NFC, and Cellular) for monitoring based on its supported capabilities, latency requirements, and power consumption. The specific process of S403 can refer to the description of S303 in method 300. The difference is that S303 monitors for large-screen devices, while S403 monitors for smartphones. Apart from this, the other specific processes are the same and will not be repeated here.
[0227] S404, after the smartphone monitors all or part of the four messages broadcast by the vehicle-mounted device, it is assumed that: the smartphone monitors the first message, the second message, the third message, and the fourth message. Based on the first message, the smartphone determines the MAC address corresponding to the BT capability of the vehicle-mounted device, hereinafter referred to as the BT MAC address. Based on the second message, the MAC address corresponding to the Wi-Fi capability of the vehicle-mounted device is determined, hereinafter referred to as the Wi-Fi MAC address. Based on the third message, the MAC address corresponding to the NFC capability of the smartphone is determined, hereinafter referred to as the NFC MAC address. Based on the fourth message, the MAC address corresponding to the USB capability of the vehicle-mounted device is determined, hereinafter referred to as the USB MAC address. In addition, the smartphone determines that the first message, the second message, the third message, and the fourth message are all from the same device based on the random values carried by the first message, the second message, the third message, and the fourth message, respectively. Based on this information, the smartphone can obtain the network identification information of the vehicle-mounted device, which includes: BT MAC, Wi-Fi MAC, USB MAC, and NFC MAC, that is, the network identification information includes four parameters of the vehicle-mounted device, which are: the BT MAC address of the vehicle-mounted device, the Wi-Fi MAC address of the vehicle-mounted device, the USB MAC address of the vehicle-mounted device, and the NFC MAC address of the vehicle-mounted device. The network identification information is used to uniquely identify the vehicle-mounted device.
[0228] Optionally, in an embodiment of the present application, as another possible implementation method, the above-mentioned first to fourth messages may also carry the IP address of the vehicle-mounted device respectively. In this case, the smart phone can also obtain the IP address of the vehicle-mounted device, thereby obtaining the network identification information of the vehicle-mounted device, and the network identification information includes: BT MAC, Wi-Fi MAC, USB MAC, NFC MAC, IP address, that is, the network identification information includes five parameters of the vehicle-mounted device, and the five parameters are: the BT MAC address of the vehicle-mounted device, the Wi-Fi MAC address of the vehicle-mounted device, the USB MAC address of the vehicle-mounted device, the NFC MAC address of the vehicle-mounted device, and the IP address of the vehicle-mounted device.
[0229] Alternatively, if the first to fourth messages do not carry the IP address of the vehicle-mounted device, after the smartphone receives the first to fourth messages, the smartphone can also send a broadcast message to the vehicle-mounted device to inquire about the IP address of the vehicle-mounted device, thereby obtaining the IP address of the vehicle-mounted device.
[0230] Furthermore, the smartphone can use the network identification information of the vehicle-mounted device to perform device deduplication processing and share information between different technologies. The specific process can refer to the description of S304 in method 300. The difference is that S304 performs deduplication processing for large-screen devices, while S404 performs deduplication processing for smartphones. Apart from this, other specific processes are the same and will not be repeated here.
[0231] In S404, the smart phone performs deduplication processing on the device information discovered by the multiple wireless and wired technologies (capabilities), and displays the identifiers of the multiple different devices remaining after the deduplication processing to the user, that is, displays a device list to the user. For example, the display interface can be as follows: Figure 8 As shown in d.
[0232] In S405 , the user may select an in-vehicle device from a plurality of device lists as required, and then connect to 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 multiple device lists, the smartphone can also automatically select the target device according to a preset condition. For example, the preset condition includes: automatically connecting to other devices whose distance from the smartphone is less than a certain threshold, automatically connecting to a device with a preset MAC address, etc. This embodiment of the application is not limited.
[0234] In S406, after the user selects the vehicle-mounted device, the smartphone sends a connection request to the vehicle-mounted device. The connection request includes: standard request information defined in the protocol corresponding to the optimal one or more connection modes (such as Wi-Fi, Bluetooth, etc.), for example, it may include information such as a connection address, a connection window, and security requirements.
[0235] It should be understood that in S406, the smartphone will select an optimal method or multiple methods to connect to the large-screen device from BT, Wi-Fi, NFC, USB, Zigbee, and mobile network based on the capabilities supported by the smartphone and the capabilities supported by the peer device (vehicle-mounted device), and further, based on the business information to be transmitted. The specific process can be referred to the description of S308 in method 300, which will not be repeated here.
[0236] In S407, after the vehicle-mounted device receives the connection request sent by the smartphone, it determines the connection method carried in the connection request (for example, any one or more of BT, Wi-Fi, USB, and NFC) based on the information carried in the connection request, and establishes a communication connection between the vehicle-mounted device and the smartphone based on the connection method.
[0237] It should be understood that in the embodiment of the present application, a plurality of different technology connections can be established between the smart phone and the vehicle-mounted device. For example, a BT connection and a Wi-Fi connection can be established between the smart phone and the vehicle-mounted device at the same time.
[0238] In S408 , after a communication connection is established between the vehicle-mounted device and the smart phone, the user can send data to the vehicle-mounted device via the smart phone.
[0239] It should be understood that in the embodiment of the present application, when there are multiple connections between the smartphone and the vehicle-mounted device at the same time, the smartphone can select the best one, or select multiple ones at the same time to transmit data to the vehicle-mounted device.
[0240] The method for discovering and connecting electronic devices provided by the present application utilizes all the technologies (capabilities) of electronic devices for discovering devices or multiple technologies (capabilities) of all discovering devices to actively listen to the messages broadcast by peripheral devices at the same time, and the peripheral devices utilize all the technologies (capabilities) of discovering devices or multiple technologies (capabilities) of all discovering devices to actively broadcast messages at the same time, so as to meet the requirements of business services for the discovery and connection capabilities of devices with multiple different technical capabilities under heterogeneous network conditions, and improve user experience. In addition, using the network identifier of the device to identify a device can avoid the problem that the unique device ID commonly used in the industry is easy to be tracked when identifying the device, and can effectively prevent the device ID information from being tracked, improve the security of the device, and meet the dynamic change of the network identifier when the device capability is dynamically changing. Further, the network identifier of the device is used to remove device duplication, thereby filtering out duplicate information, so that multiple discovery connection technologies can be used in parallel, and the efficiency of device discovery can be improved. In addition, when connecting a device, the supported capabilities of the opposite device can be obtained, so that the optimal connection technology and connection capability can be selected according to the business and scenario for connection, thereby improving the user experience.
[0241] It should be understood that the above is only to help those skilled in the art better understand the embodiments of the present application, rather than to limit the scope of the embodiments of the present application. According to the above examples given, those skilled in the art can obviously make various equivalent modifications or changes, for example, some steps in the above methods 300 and 400 may not be necessary, or some new steps may be added. Or a combination of any two or any multiple embodiments of the above. Such modifications, changes or combined solutions also fall within the scope of the embodiments of the present application.
[0242] It should also be understood that the division of the methods, situations, categories and embodiments in the embodiments of the present application is only for the convenience of description and should not constitute a special limitation. The features of various methods, categories, situations and embodiments can be combined without contradiction.
[0243] It should also be understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean 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 the present application.
[0244] It should also be understood that the above description of the embodiments of the present application focuses on emphasizing the differences between the various embodiments. The same or similar points that are not mentioned can be referenced to each other. For the sake of brevity, they will not be repeated here.
[0245] The above combination Figure 1-Figure 10 An embodiment of a method for discovering and connecting an electronic device provided by an embodiment of the present application is described. The electronic device provided by an embodiment of the present application is described below.
[0246] In this embodiment, the electronic device (including the first electronic device and the second electronic device) can be divided into functional modules according to the above method. For example, it can be divided into various functional modules corresponding to various functions, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0247] It should be noted that the relevant contents of each step involved in the above method embodiment can all be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0248] The electronic device provided in the embodiment of the present application is used to perform any method of discovering and connecting an electronic device in the above method embodiment, so that the same effect as the above implementation method can be achieved. In the case of an integrated unit, the electronic device may include a processing module, a storage module and a communication module. Among them, 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 to execute the steps performed by the processing unit. The storage module can be used to support the storage of program codes and data, etc. The communication module can be used to support the communication between the electronic device and other devices.
[0249] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.
[0250] For example, Fig.11 FIG. 5 is a schematic diagram showing the hardware structure of an electronic device 500 provided in the present application. The electronic device 500 may be a smart phone, a large-screen device or a vehicle-mounted device in the above-mentioned method embodiment. Fig.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, and the like.
[0251] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 500. In other embodiments of the present application, the electronic device 500 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0252] The processor 510 may include one or more processing units. For example, the processor 510 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent components or integrated into one or more processors. In some embodiments, the electronic device 500 may also include one or more processors 510. The controller may generate an operation control signal based on the instruction opcode and the timing signal to complete the control of fetching and executing instructions.
[0253] In some embodiments, the processor 510 may include one or more interfaces. The interface 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. Among them, the USB interface 530 is an interface that complies with the USB standard specification, and specifically can be 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 to transmit data between the electronic device 500 and peripheral devices.
[0254] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 500. In other embodiments of the present application, the electronic device 500 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0255] The wireless communication function of the electronic device 500 can be implemented through the antenna 1, the antenna 2 and the wireless communication module 550.
[0256] The wireless communication module 550 can provide wireless communication solutions including Wi-Fi (including Wi-Fi sensing and Wi-Fi AP), Bluetooth (BT), NFC, USB, Zigbee, mobile network, wireless data transmission module (for example, 433MHz, 868MHz, 515MHz) applied to the electronic device 500. 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 signal, and sends the processed signal to the processor 510. The wireless communication module 550 can also receive the signal to be sent from the processor 510, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through antenna 1 or antenna 2.
[0257] The external memory 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 memory interface 520 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0258] The internal memory 521 can be used to store one or more computer programs, which include instructions. The processor 510 can execute the above instructions stored in the internal memory 521, so that the electronic device 500 performs the method of finding and connecting electronic devices provided in some embodiments of the present application, as well as various applications and data processing. The internal memory 521 may include a code storage area and a data storage area. Among them, the code storage area can store an operating system. The data storage area can store data created during the use of the electronic device 500, etc. In addition, the internal memory 521 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, a flash memory component, a universal flash storage (UFS), etc. In some embodiments, the processor 510 can execute instructions stored in the internal memory 521, and / or instructions stored in a memory provided in the processor 510, so that the electronic device 500 performs any method of finding and connecting electronic devices provided in the embodiments of the present application, as well as other applications and data processing.
[0259] The electronic device 500 includes, but is not limited to, a smart TV, a large-screen device, a mobile phone, a tablet computer, a notebook, a large-screen TV, a smart home appliance, a PDA, a POS, a car computer, etc. The present application embodiment is not limited here.
[0260] It should be understood that the specific process of the electronic device 500 performing the above corresponding steps can be referred to in conjunction with the above Figure 6 , Fig.10 For the sake of brevity, the relevant descriptions of the execution steps of the smart phone, large-screen device or vehicle-mounted device described in the various embodiments shown are not repeated here.
[0261] It should also be understood that the division of units in the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And the units in the device can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some units can also be implemented in the form of software calling through processing elements, and some units can be implemented in the form of hardware. For example, each unit can be a separately established processing element, or it can be integrated in a certain chip of the device. In addition, it can also be stored in the memory in the form of a program, and called and executed by a certain processing element of the device. The processing element here can also be called a processor, which can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each unit above can be implemented by an integrated logic circuit of hardware in the processor element or in the form of software calling through a processing element. In one example, the unit in any of the above devices may be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA), or a combination of at least two of these integrated circuit forms. For another example, when the 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 that can call a program. For another example, these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0262] An embodiment of the present application also provides a system for discovering and connecting electronic devices, the system comprising: a first electronic device (for example, a smart phone) and a second electronic device (for example, a large-screen device or a vehicle-mounted device) provided in the above method embodiment.
[0263] The embodiment of the present application also provides a computer-readable storage medium for storing computer program code, the computer program including instructions for executing any one of the methods for discovering and connecting electronic devices provided in the above-mentioned embodiment of the present application. The readable medium may be a read-only memory (ROM) or a random access memory (RAM), which is not limited in the embodiment of the present application.
[0264] The present application also provides a computer program product, which includes instructions. When the instructions are executed, the first electronic device and the second electronic device perform corresponding operations corresponding to the above-mentioned method 300 and method 400.
[0265] The embodiment of the present application further provides a chip located in a communication device, the chip comprising: a processing unit and a communication unit, the processing unit, for example, may be a processor, the communication unit, for example, may be an input / output interface, a pin or a circuit, etc. The processing unit may execute computer instructions to enable the communication device to execute any of the methods for discovering and connecting electronic devices provided in the embodiments of the present application.
[0266] Optionally, the computer instructions are stored in a storage unit.
[0267] Optionally, the storage unit is a storage unit within the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip within the terminal, such as a ROM or other types of static storage devices that can store static information and instructions, random RAM, etc. Among them, the processor mentioned in any of the above can be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above-mentioned feedback information transmission method. The processing unit and the storage unit can be decoupled and respectively set on different physical devices, and connected by wired or wireless means to implement the respective functions of the processing unit and the storage unit to support the system chip to implement the various functions in the above-mentioned embodiments. Alternatively, the processing unit and the memory can also be coupled on the same device.
[0268] Among them, the communication device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer 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 embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a ROM, a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a RAM, which is used as an external cache. There are many different types of RAM, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (doubledata rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DRRAM).
[0270] Various objects such as various messages / information / equipment / network elements / systems / devices / actions / operations / processes / concepts that may appear in this application are named. It can be understood that these specific names do not constitute a limitation on the relevant objects. The names assigned may change with factors such as scenarios, contexts or usage habits. The understanding of the technical meaning of the technical terms in this application should be mainly determined from the functions and technical effects embodied / executed in the technical scheme.
[0271] In the various embodiments of the present application, unless otherwise specified or provided in a logical conflict, the terms and / or descriptions between the different embodiments are consistent and may be referenced to each other, and the technical features in the different embodiments may be combined to form new embodiments according to their inherent logical relationships.
[0272] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0273] The method in the embodiment of the present application can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed 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 instruction can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server that integrates one or more available media.
[0274] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0275] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0276] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0277] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0278] If the functions are implemented in the form of 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 the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a readable storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned readable storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0279] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for discovering and connecting an electronic device, characterized in that: The method comprises: The first electronic device broadcasts a first message using a first communication technology within a first time period, where the first message is used to query the communication technology capabilities of other devices; The first electronic device broadcasts a second message using a second communication technology within a second time period, the second message is used to query the communication technology capabilities of other devices, the first time period overlaps with the second time period, and the first message and the second message both include a first random code of the first electronic device; The first electronic device receives response information sent by the second electronic device; The first electronic device determines, according to the response information, the communication technology capability supported by the second electronic device; The first electronic device establishes a communication connection with the second electronic device according to the communication technology capability supported by the second electronic device.
2. The method according to claim 1, characterized in that The method further comprises: The first electronic device broadcasts a third message using a third communication technology within a third time period, wherein the third message is used to query the communication technology capabilities of other devices; There is a conflict between the third communication technology and the first communication technology, the first time period does not overlap with the third time period, and the second time period overlaps with the third time period.
3. The method according to claim 1 or 2, characterized in that: The first message includes: indication information for indicating the communication technology capability 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 any one of claims 1 to 3, characterized in that The response information includes: a second random code of the second electronic device, and indication information for indicating the communication technology capability 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 according to the communication technology capability supported by the second electronic device, the method further includes: The first electronic device determines, according to the second random code, that the response information comes from the second electronic device; The first electronic device acquires the network identification information of the second electronic device according to the response information, where the network identification information of the second electronic device includes: a MAC address or an 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, where the first information includes a network identifier of the second electronic device; The first electronic device determines that the first information comes from the second electronic device according to 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 any one of claims 1 to 6, characterized in that The first electronic device establishes a communication connection with the second electronic device according to the communication technology capability supported by the second electronic device, including: The first electronic device determines, according to the communication technology capabilities supported by the second electronic device, a communication technology capability set supported by both the first electronic device and the second electronic device; The first electronic device sends a connection request to the second electronic device according to the service to be transmitted in the communication technology capability set, where the connection request includes connection information corresponding to one or more communication technologies respectively; The first electronic device establishes a communication connection with the second electronic device using the one or more communication technologies.
8. The method according to claim 7, characterized in that The method further comprises: 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 any one of claims 1 to 8, characterized in that The first communication technology or the second communication technology is: Bluetooth, Wi-Fi, NFC, USB, ZigBee or cellular network, and the first communication technology is different from the second communication technology.
10. A method for discovering and connecting to an electronic device, characterized in that: The method comprises: The first electronic device broadcasts a first message using a first communication technology within a first time window, where the first message is used to query the communication technology capabilities of other devices; The first electronic device broadcasts a second message using a second communication technology within the first time window, wherein the second message is used to query the communication technology capabilities of other devices, and both the first message and the second message include a first random code of the first electronic device; The first electronic device receives response information sent by the second electronic device; The first electronic device determines, according to the response information, the communication technology capability supported by the second electronic device; The first electronic device establishes a communication connection with the second electronic device according to the communication technology capability supported by the second electronic device.
11. The method according to claim 10, characterized in that The method further comprises: The first electronic device broadcasts a third message using a third communication technology within the first time window, where the third message is used to query the communication technology capabilities of other devices; wherein the third communication technology conflicts with the first communication technology.
12. The method according to claim 11, characterized in that The response information includes: a second random code of the second electronic device, and indication information for indicating the communication technology capability of the second electronic device; The first electronic device determines, according to the second random code, that the response information comes from the second electronic device; The first electronic device acquires the network identification information of the second electronic device according to the response information, where the network identification information of the second electronic device includes: a MAC address or an IP address of the second electronic device.
13. A method for discovering and connecting to an electronic device, characterized in that: The method comprises: The second electronic device receives, within a first time period, a first message broadcast by the first electronic device using a first communication technology, where the first message is used to query the communication technology capability of other devices; The second electronic device receives, within 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, and the first time period and the second time period overlap; The second electronic device sends response information to the first electronic device according to the first message and the second message, wherein the first message and the second message both include a first random code of the first electronic device; The second electronic device receives a connection request sent by the first electronic device; The second electronic device establishes a communication connection with the first electronic device according to the connection request.
14. The method according to claim 13, characterized in that The method further comprises: The second electronic device receives, within a third time period, a third message broadcast by the first electronic device using a third communication technology, wherein the third message is used to query the communication technology capability of other devices; There is a conflict between the third communication technology and the first communication technology, the first time period does not overlap with the third time period, and the second time period overlaps with the third time period.
15. The method according to claim 13, characterized in that The first message includes: indication information for indicating the communication technology capability 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, according to the first random code, that the first message and the second message both come from the first electronic device; The second electronic device obtains network identification information of the first electronic device according to the first message and the second message, where the network identification information of the first electronic device includes: a MAC address or an 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, where the second information includes a network identifier of the first electronic device; The second electronic device determines that the second information comes from the first electronic device according to 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 includes: a second random code of the second electronic device, and indication information for indicating the communication technology capability of the second electronic device.
19. The method according to claim 18, characterized in that The method further comprises: The second electronic device receives the data of the service to be transmitted sent by the first electronic device through one or more communication technologies for which a communication connection has been established.
20. An electronic device, characterized in that: include: Processor and memory; The processor is coupled to a memory, and the memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the method according to any one of claims 1 to 12 or the method according to any one of claims 13 to 19 is executed.
21. A chip, characterized in that: include: A processor, configured to call and run a computer program from a memory, so that a communication device equipped with the chip executes a method as claimed in any one of claims 1 to 12, or executes a method as claimed in any one of claims 13 to 19.
Citation Information
Patent Citations
Communication method and device
CN105191172A
Method for establishing communication, and terminal
CN110121902A
Electronic device for performing communication with external electronic device
US20190020735A1
Cited By
Near-field multi-channel discovery method for discovery side and server side
CN121397503A