WO2022206672A1 - 发现和连接电子设备的方法以及电子设备 - Google Patents

发现和连接电子设备的方法以及电子设备 Download PDF

Info

Publication number
WO2022206672A1
WO2022206672A1 PCT/CN2022/083364 CN2022083364W WO2022206672A1 WO 2022206672 A1 WO2022206672 A1 WO 2022206672A1 CN 2022083364 W CN2022083364 W CN 2022083364W WO 2022206672 A1 WO2022206672 A1 WO 2022206672A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
communication technology
message
communication
capabilities
Prior art date
Application number
PCT/CN2022/083364
Other languages
English (en)
French (fr)
Inventor
邱泽令
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP22778854.4A priority Critical patent/EP4287711A1/en
Publication of WO2022206672A1 publication Critical patent/WO2022206672A1/zh
Priority to US18/474,719 priority patent/US20240022892A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0215Traffic management, e.g. flow control or congestion control based on user or device properties, e.g. MTC-capable devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update
    • H04W40/246Connectivity information discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent
    • H04W12/75Temporary identity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities

Definitions

  • the present application relates to the field of communications, and more particularly, to a method for discovering and connecting electronic devices and electronic devices.
  • wireless technologies and wired technical solutions are involved in a wireless communication network, such as Bluetooth (bluetooth, BT) technology, wireless-fidelity technology (wireless-fidelity, ) technology, near field communication (near field communication, NFC) technology, Zigbee technology, universal serial bus (universal serial bus, USB) technology, cellular communication (Cellular) technology, etc.
  • Bluetooth bluetooth
  • wireless-fidelity wireless-fidelity
  • NFC near field communication
  • Zigbee technology universal serial bus (universal serial bus, USB) technology
  • Cellular cellular communication
  • a device When a device has the capabilities of multiple wireless technologies and wired technologies, it will use one of these technologies to discover the capabilities of different wireless technologies and wired technologies (such as the distance of transmission, bandwidth, etc.) other devices, and establish communication connections and data transmissions with other devices.
  • this method cannot meet the requirements of business services for devices with multiple wireless technology capabilities in a heterogeneous network architecture, and the user experience is poor.
  • the present application provides a method for discovering and connecting electronic devices and electronic devices. Using all the technologies (capabilities) of discovering devices possessed by an electronic device or multiple of all the technologies (capabilities) of discovering devices to discover another device at the same time, it satisfies that under the condition of heterogeneous network, the business service pair has a variety of different technologies. The ability of the device to discover the requirements for connectivity capabilities improves the user experience.
  • a method for discovering and connecting an electronic device includes: a first electronic device broadcasts a first message using a first communication technology within a first time period, where the first message is used for querying The communication technology capability of other devices; the first electronic device uses the second communication technology to broadcast a second message within the second time period, and the second message is used to query the communication technology capability of other devices, and the first electronic device uses the second communication technology to broadcast a second message.
  • the first electronic device receives response information (one or more response information) sent by the second electronic device; the first electronic device determines, according to the response information, that the second electronic device supports communication technology capability; 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 first electronic device uses multiple communication technologies to broadcast messages respectively in overlapping time periods, that is, the time periods for respectively broadcasting messages using multiple different communication technologies are at the time.
  • the domains are overlapping (partially or completely). That is, using all the technologies (capabilities) of all discovery devices or the technologies (capabilities) of all discovery devices possessed by the same electronic device to send (simultaneously broadcast) messages at the same time, it satisfies that under heterogeneous network conditions, business services have
  • the requirements for the discovery and connection capabilities of devices with different technical capabilities can actively discover more devices that support distribution capabilities, realize the integration of support for multiple discovery and connection technologies, improve the efficiency of discovering and connecting electronic devices, and improve user experience. .
  • the method further includes: within a third time period, the first electronic device broadcasts a third message using a third communication technology, where the third message is used to query other devices Communication technology capability; 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, the second time period and the third time period Segments overlap.
  • the first electronic device uses conflicting communication technologies (for example, there is a conflict in channel, air interface timing, etc.) to simultaneously broadcast the message, the first electronic device uses the conflicting communication technologies to broadcast the time period of the message respectively.
  • sending at the same time can be understood as: using the first communication technology to broadcast the first packet in the first time period, and using the second communication technology to broadcast the first packet in the second time period.
  • Text 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 may overlap in the time domain (may be partially overlapped). or all overlap).
  • the third communication technology is used to broadcast the third packet in the third time period. ), 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.
  • sending at the same time can be understood as: the time periods in which the messages are sent separately by using a variety of non-conflicting communication technologies overlap in the time domain (partially overlapping or fully overlapping), and the time periods when the messages are sent separately by using conflicting communication technologies are The time periods of the text do not overlap in the time domain.
  • a method for discovering and connecting an electronic device includes: a first electronic device broadcasts a first message using a first communication technology within a first time window, where the first message is used for querying The communication technology capability of other devices; the first electronic device broadcasts a second message using the second communication technology within the first time window, and the second message is used to query the communication technology capability of other devices; the first electronic device uses the second communication technology to broadcast a second message.
  • An electronic device receives the response information sent by the second electronic device; the first electronic device determines the communication technology capability supported by the second electronic device according to the response information (one or more response information); The communication technology capability supported by the electronic device establishes a communication connection with the second electronic device.
  • the first electronic device uses multiple communication technologies, and within the time granularity of the same time window, uses multiple different communication technologies to send packets simultaneously. It realizes the simultaneous transmission (simultaneous broadcast) of messages by using all the technologies (capabilities) of all discovery devices or the technologies (capabilities) of all discovery devices possessed by the same electronic device, so as to satisfy the requirements of the business service pairing under heterogeneous network conditions.
  • the requirements for the discovery and connection capabilities of devices with a variety of different technical capabilities can actively discover more devices that support distribution capabilities, realize the integration of support for multiple discovery and connection technologies, improve the efficiency of discovering and connecting electronic devices, and improve users. experience.
  • a group of messages is jointly sent by using a variety of different communication technologies (eg, BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) defined in the wireless communication protocol.
  • the shortest time unit of BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc. is used to send messages. That is, within the first time window, the first electronic device transmits (broadcasts) a message by using all the technologies it has for discovering devices or a variety of technologies for discovering devices.
  • the first time window is a time unit with the smallest length.
  • the first time window can be understood as the need for the first electronic device to send a message by using all the technologies it has for discovering devices or a variety of technologies for discovering devices.
  • the first time window is the smallest time granularity and is not temporally divisible.
  • the length of the first time window may be in the order of microseconds, milliseconds, or seconds.
  • the first time window consists of multiple time slots or multiple symbols.
  • the method further includes: the method further includes: the first electronic device uses a third communication technology to broadcast a third message within the first time window, and the third message The text is used to query the communication technology capabilities of other devices; wherein, the third communication technology and the first communication technology are in conflict.
  • the first electronic device uses multiple non-conflicting communication technologies to broadcast the message respectively (that is, the time period for respectively broadcasting the message using multiple non-conflicting communication technologies is in the time domain). There is overlap, which may be partial or complete. Within this time window, the first electronic device uses another communication technology to broadcast the message at the same time.
  • the other communication technology and the time window are used to broadcast the message If a certain communication technology conflicts with each other, then use multiple conflicting communication technologies to send broadcast messages in time-sharing within the time window. Satisfy that under the condition of heterogeneous network, the service service to the equipment with different technical capabilities Discover connectivity requirements and improve user experience.
  • sending at the same time can be understood as: within the time length of a time window, within the time window, the electronic device simultaneously uses multiple non-conflicting communication technologies to broadcast packets respectively (that is, The time periods for respectively broadcasting messages using multiple non-conflicting communication technologies overlap in the time domain, and may be partially or completely overlapping, for example, multiple non-conflicting communication technologies can start broadcasting messages simultaneously).
  • another communication technology is used to broadcast the message at the same time. If another communication technology conflicts with a certain communication technology used to broadcast the message within the time window, the conflict will be used.
  • a variety of communication technologies are available, and service query requests are sent in time-sharing within this time window.
  • "simultaneously sending" in the examples of this application can be understood as: within the time granularity of a time window, the electronic device needs to use multiple different communication technologies to simultaneously broadcast messages.
  • the multiple different communication technology capabilities of the first electronic device include: multiple ones of BT, Wi-Fi, NFC, Zigbee, USB, Cellular and other capabilities.
  • 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 items, PDAs, in-vehicle computers, and the like.
  • the first message indicates a communication technology capability possessed by the first electronic device or indicates a communication technology used by the first electronic device to broadcast the message.
  • the second electronic device can be made aware of the communication technology capability possessed by the first electronic device, thereby facilitating the second electronic device to establish a communication connection with the first electronic device according to the communication technology capability possessed by the first electronic device. Efficiency in establishing communication connections.
  • the communication technology capabilities of the first electronic device include: BT, Wi-Fi, NFC, Zigbee, USB, Cellular and other capabilities.
  • both the first packet and the second packet 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 may generate different first random codes at different times, where the first random codes are used to uniquely identify the first electronic device.
  • the same random code carried in different messages is used to identify that both the first message and the second message are from the first electronic device, which is easy to implement, saves communication resources and has high accuracy.
  • the response information includes: a second random code of the second electronic device, and indication information used to indicate a communication technology capability possessed by the second electronic device.
  • the random code is randomly generated by the second electronic device.
  • the second electronic device may generate different random codes at different times, and the random codes are used to uniquely identify the second electronic device.
  • the first electronic device can be made aware of the communication technology capability possessed by the second electronic device, thereby facilitating the first electronic device to establish a communication connection with the second electronic device according to the communication technology capability possessed by the second electronic device, thereby improving Efficiency in establishing communication connections.
  • using the same random code carried in different messages to identify that both the first message and the second message are from the first electronic device is easy to implement, saves communication resources, and has high accuracy.
  • the method 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 that the response information comes from the second electronic device according to the second random code; the first electronic device obtains the network identification information of the second electronic device according to the response information, and the second electronic device's
  • the network identification information includes: the MAC address or IP address of the second electronic device.
  • the network identification information of the second electronic device is used to identify the second electronic device.
  • the network identification information of the second electronic device can be changed, and can be dynamically expanded and updated according to changes in the capabilities supported by the second electronic device.
  • the network identification information of the second electronic device can be dynamically expanded, and the network identification information of the second electronic device is used to identify the device, which can effectively prevent the device ID information from being tracked, and solves the problem of using the unique ID of the device in the prior art. To identify problems that are easy to be tracked when the device is used to improve the security of the device.
  • the network identification information of the second electronic device includes: BT MAC, Wi-Fi MAC, USB MAC, and IP, that is, the network identification information of the second electronic device includes four parameters of the second electronic device. These four parameters They 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.
  • the response information received by the first electronic device and sent by the second electronic device may be one or more, and different response information is broadcast or sent by the second electronic device using different communication technologies.
  • the method further includes: the first electronic device receives the second electronic device The first information sent, the first information includes the network identifier of the second electronic device; the first electronic device is based on the network identifier information of the second electronic device and the network identifier of the second electronic device carried by the first information , it is determined that the first information comes from the second electronic device.
  • the first electronic device can determine whether the first information is If sent by the second electronic device, deduplication processing of the device is performed. Further, the content included in multiple pieces of 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 resources. utilization rate.
  • 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 The device determines the 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 is in the set of communication technology capabilities, according to the service to be transmitted, Send a connection request to the second electronic device, where the connection request includes connection information corresponding to one or more communication technologies; the first electronic device uses the one or more communication technologies to establish a communication connection with the second electronic device.
  • the first electronic device can use one or more communication technologies to establish a communication connection with the second electronic device, so as to improve the efficiency of the communication connection, and can meet the requirements of different service transmissions.
  • connection request includes: standard request information defined in a protocol corresponding to one or more optimal connection methods (such as Wi-Fi, Bluetooth, etc.), for example, may include connection address, connection window, security requirements and other information.
  • standard request information defined in a protocol corresponding to one or more optimal connection methods such as Wi-Fi, Bluetooth, etc.
  • connection address may include connection address, connection window, security requirements and other information.
  • the first electronic device may predefine a connection policy, and for a service with a large bandwidth, during near-field transmission, the different capabilities are sorted in descending order of priority.
  • the different capabilities that is, technologies
  • the first electronic device can be prioritized according to the above-mentioned different capabilities. level, among the capabilities supported by both the first electronic device and the second electronic device, select the method with the highest priority to connect with the large-screen device. Alternatively, select the first several methods with higher priority to connect with the second electronic device.
  • the first electronic device may monitor the process of multiple connections.
  • the communication delay in each connection process, the bandwidth information of each connection process, etc. dynamically adjust the way of establishing a connection with the second electronic device subsequently, and dynamically adjust the priority order of different capabilities. Further improve the efficiency of the communication connection.
  • the first electronic device sends the data of the service to be transmitted to the second electronic device by using one or more communication technologies for which a communication connection has been established.
  • the first electronic device may select the optimal one, or select multiple connections simultaneously to the first electronic device.
  • the second electronic device transmits data, which improves the efficiency of data transmission between the first electronic device and the second electronic device, and further improves the user experience.
  • a method for discovering and connecting an electronic device comprising: within a first time period, a second electronic device receives a first message broadcast by the first electronic device using a first communication technology, the first message A message is used to query the communication technology capabilities of other devices; the second electronic device receives, within a second time period, a second message broadcast by the first electronic device using the second communication technology, and the second message uses In order to query the communication technology capabilities of other devices, 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 ; 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.
  • the first electronic device uses multiple communication technologies to broadcast messages respectively in overlapping time periods, that is, the time periods for respectively broadcasting messages using multiple different communication technologies are at the time
  • the domains are overlapping (partially or completely). That is, using all the technologies (capabilities) of all discovery devices or the technologies (capabilities) of all discovery devices possessed by the same electronic device to send (simultaneously broadcast) messages at the same time, it satisfies that under heterogeneous network conditions, business services have
  • the requirements for the discovery and connection capabilities of devices with different technical capabilities can actively discover more devices that support distribution capabilities, realize the integration of support for multiple discovery and connection technologies, improve the efficiency of discovering and connecting electronic devices, and improve user experience. .
  • the method further includes: within a third time period, the second electronic device, receiving a third packet broadcast by the first electronic device using a third communication technology, the third The 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 The time period overlaps with the third time period.
  • the first electronic device uses conflicting communication technologies (for example, there is a conflict in channel, air interface timing, etc.) to simultaneously broadcast messages, the first electronic device uses the conflicting communication technologies to respectively send the time of the service query request.
  • the segments do not overlap in the time domain, and the time segments of the broadcast messages of various non-conflicting communication technologies overlap in the time domain (partially or completely overlapped), thus realizing the use of the same electronic device.
  • the requirements for discovering connectivity capabilities improve the user experience.
  • a method for discovering and connecting an electronic device comprising: within a first time window, the second electronic device receives a first message broadcast by the first electronic device using a first communication technology, the first message A message is 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 the second communication technology within the first time window; the second electronic device Send response information to the first electronic device according to the first message and the second message; the second electronic device receives the connection request sent by the first electronic device; the second electronic device communicates with the first electronic device according to the connection request A communication connection is established between electronic devices.
  • 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. It realizes the simultaneous transmission (simultaneous broadcast) of messages by using all the technologies (capabilities) of all discovery devices or the technologies (capabilities) of all discovery devices possessed by the same electronic device, so as to satisfy the requirements of the business service pairing under heterogeneous network conditions.
  • the requirements for the discovery and connection capabilities of devices with a variety of different technical capabilities can actively discover more devices that support distribution capabilities, realize the integration of support for multiple discovery and connection technologies, improve the efficiency of discovering and connecting electronic devices, and improve users. experience.
  • the method further includes: within the first time window, the second electronic device receives a third packet broadcast by the first electronic device using a third communication technology, the first The three packets are used to query the communication technology capabilities of other devices; wherein, the third communication technology and the first communication technology are in conflict.
  • the first electronic device uses multiple non-conflicting communication technologies to broadcast the message respectively (that is, the time period for respectively broadcasting the message using multiple non-conflicting communication technologies is in the time domain). There is overlap, which may be partial or complete. Within this time window, the first electronic device uses another communication technology to broadcast the message at the same time.
  • the other communication technology and the time window are used to broadcast the message If a certain communication technology conflicts with each other, then use multiple conflicting communication technologies to send broadcast messages in time-sharing within the time window. Satisfy that under the condition of heterogeneous network, the service service to the equipment with different technical capabilities Discover connectivity requirements and improve user experience.
  • the multiple different communication technology capabilities of the first electronic device or the second electronic device include: multiple capabilities of BT, Wi-Fi, NFC, Zigbee, USB, Cellular, and the like.
  • 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 items, PDAs, in-vehicle computers, and the like.
  • the first message indicates a communication technology capability possessed by the first electronic device or indicates a communication technology used by the first electronic device to broadcast the message.
  • the second electronic device can be made aware of the communication technology capability possessed by the first electronic device, thereby facilitating the second electronic device to establish a communication connection with the first electronic device according to the communication technology capability possessed by the first electronic device. Efficiency in establishing communication connections.
  • both the first packet and the second packet 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 may generate different random codes at different times, and the random codes are used to uniquely identify the first electronic device.
  • the same random code carried in different messages is used to identify that both the first message and the second message are from the first electronic device, which is easy to implement, saves communication resources and has high accuracy.
  • the method 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 according to the connection request The first random code determines that both the first message and the second message are from the first electronic device; the second electronic device obtains the information of the first electronic device according to the first message and the second message Network identification information, the network identification information of the first electronic device includes: the MAC address or IP address of the first electronic device.
  • the network identification information of the first electronic device is used to identify the first electronic device.
  • the network identification information of the first electronic device can be changed, and can be dynamically expanded and updated according to changes in the capabilities supported by the first electronic device.
  • 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, and solves the problem of using the unique ID of the device in the prior art. To identify problems that are easy to be tracked when the device is used to improve the security of the device.
  • the network identification information of the first electronic device includes: BT MAC, Wi-Fi MAC, NFC MAC, USB MAC, IP, that is, the network identification information of the first electronic device includes five parameters of the first electronic device, which are 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 of the first electronic device. address.
  • the method further includes: the second electronic device receives the first message
  • the second information sent by the electronic device includes the network identification of the first electronic device; the second electronic device is based on the network identification information of the first electronic device and the network identification information of the first electronic device carried by the second information.
  • the network identifier determines that the second information comes from the first electronic device.
  • the second electronic device can determine whether the second information is Sent by the first electronic device, that is, the deduplication process of the device is performed. Further, the content included in multiple pieces of information 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 resources. utilization rate.
  • 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 In the fourth time period, the first response information is sent to the first electronic device by using the fourth communication technology; the second electronic device is sent to the first electronic device by using the fifth communication technology in the fifth time period. In response to the information, the fourth time period and the fifth time period overlap.
  • the second electronic device uses multiple communication technologies to broadcast messages respectively in overlapping time periods, that is, uses multiple different communication technologies to send response information (broadcast messages) to the first electronic device respectively.
  • the time periods in which multiple response messages are sent are overlapped (partially or completely overlapped) in the time domain.
  • the business service pair has a variety of different technologies.
  • the requirements for the discovery and connection capabilities of capable devices realize the integration of supporting multiple discovery and connection technologies, improve the efficiency of discovering and connecting electronic devices, and improve user experience.
  • the method further includes: sending, by the second electronic device, third response information to the first electronic device by using a sixth communication technology within a sixth time period;
  • the sixth communication technology and the fourth communication technology conflict, 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.
  • the second electronic device transmits the response information (broadcast message) by using conflicting communication technologies (for example, there is a conflict in channel, air interface timing, etc.) at the same time, the second electronic device transmits the response information (broadcast message) separately by using the conflicting communication technologies.
  • the time period of the message does not overlap in the time domain, and the time periods in which a variety of non-conflicting communication technologies send messages respectively overlap in the time domain (partially or completely overlapped), thus realizing the use of the same communication technology.
  • An electronic device has all the technologies (capabilities) of discovering devices or a variety of technologies (capabilities) of discovering devices to send messages at the same time, which satisfies that under the condition of heterogeneous network, business services can be used for devices with multiple different technical capabilities. The requirements for discovering connectivity capabilities improve the user experience.
  • 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 Within the second time window, use the fourth communication technology to send the first response information to the first electronic device; within the second time window, the first electronic device uses the fifth communication technology to send the first response information to the first electronic device 2.
  • Response information In this implementation manner, the second electronic device uses multiple communication technologies, and within the time granularity of the same time window, uses the multiple different communication technologies to simultaneously send packets.
  • the response information includes: a second random code of the second electronic device, and indication information used to indicate a communication technology capability possessed by the second electronic device.
  • the second random code is randomly generated by the second electronic device.
  • the second electronic device may generate different second random codes at different times, where the second random codes are used to uniquely identify the second electronic device. Using the same random code carried by different response information to identify that both the first response information and the second response information come from the second electronic device is easy to implement, saves communication resources, and has high accuracy.
  • the first electronic device can be made aware of the communication technology capability possessed by the second electronic device, thereby facilitating the first electronic device to establish a communication connection with the second electronic device according to the communication technology capability possessed by the second electronic device, thereby improving the ability to establish a communication connection. efficiency.
  • the connection request includes: connection information corresponding to one or more communication technologies respectively.
  • the first electronic device can use one or more communication technologies to establish a communication connection with the second electronic device, so as to improve the efficiency of the communication connection, and can meet the requirements of different service transmissions.
  • connection request includes: standard request information defined in a protocol corresponding to one or more optimal connection methods (such as Wi-Fi, Bluetooth, etc.), for example, may include connection address, connection window, security requirements and other information.
  • standard request information defined in a protocol corresponding to one or more optimal connection methods such as Wi-Fi, Bluetooth, etc.
  • connection address may include connection address, connection window, security requirements and other information.
  • the method further includes: the second electronic device receives 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 The data.
  • the first electronic device may select the optimal one, or select multiple connections simultaneously to the first electronic device.
  • the second electronic device transmits data, which improves the efficiency of data transmission between the first electronic device and the second electronic device, and further improves the user experience.
  • an electronic device comprising: a unit for performing each step in the first aspect or any possible implementation manner of the first aspect, or for performing the second aspect above Or a unit of each step in any possible implementation manner of any aspect of the second aspect.
  • an electronic device comprising: a unit for performing each step in the third aspect or any possible implementation manner of the third aspect, or for performing the fourth aspect above Or a unit of each step in the possible implementation manner of any aspect of the fourth aspect.
  • an electronic device in a seventh aspect, includes at least one processor and a memory, and the at least one processor is configured to execute: the above first aspect or the method in any possible implementation manner of the first aspect, or , a method in a possible implementation manner of the above second aspect or any one of the second aspects.
  • an electronic device in an eighth aspect, includes at least one processor and a memory, and the at least one processor is configured to execute: the third aspect or the method in any possible implementation manner of the third aspect, or , the method in the fourth aspect or any possible implementation manner of the fourth aspect.
  • an electronic device in a ninth aspect, includes at least one processor and an interface circuit, and the at least one processor is configured to execute: the method in the first aspect or any possible implementation manner of the first aspect, Or, the above second aspect or the method in any possible implementation manner of the second aspect.
  • a tenth aspect provides an electronic device, the electronic device includes at least one processor and an interface circuit, and the at least one processor is configured to execute: the method in the third aspect or any three possible implementations of the third aspect, Or, the above fourth aspect or the method in any possible implementation manner of the fourth aspect.
  • a communication apparatus in an eleventh aspect, includes any electronic device provided in the fifth aspect, the seventh aspect, or the ninth aspect.
  • a twelfth aspect provides a communication apparatus, where the communication apparatus includes any electronic device provided in the sixth aspect, the eighth aspect, or the tenth aspect.
  • a thirteenth aspect provides a communication system, the communication system comprising: any electronic device provided in the fifth aspect, seventh aspect, ninth aspect, or eleventh aspect, and the sixth aspect above , any electronic device provided by the eighth aspect, the tenth aspect, or the twelfth aspect.
  • a fourteenth aspect provides a computer program product, the computer program product comprising a computer program, when executed by a processor, for performing the method in any one of the first to fourth aspects, or , which is used to execute the method in any possible implementation manner of any one of the first aspect to the fourth aspect.
  • a fifteenth aspect provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed, is used to execute any one of the first to fourth aspects.
  • a sixteenth aspect provides a chip, the chip comprising: a processor for calling and running a computer program from a memory, so that a communication device installed with the chip executes any one of the first to fourth aspects A method, or a method for performing any possible implementation manner of any one of the first aspect to the fourth aspect.
  • the method for discovering and connecting an electronic device and the electronic device provided by the present application utilize all the technologies (capabilities) of discovering devices or multiple technologies (capabilities) of discovering devices possessed by the same electronic device to simultaneously broadcast or send messages at the same time , to meet the requirements of the business service for the discovery and connection capability of devices with multiple different technical capabilities under the condition of heterogeneous networks, so that multiple discovery and connection technologies can be used in parallel, and the efficiency of device discovery can be improved. Improve user experience.
  • the network identification information of the device can avoid the problem that the device is easily tracked when the unique device ID is commonly used in the industry, can effectively prevent the device ID information from being tracked, improve the security of the device, and meet the When the device capability changes dynamically, the network identification information changes dynamically accordingly. Further, the network identifier of the device is used to deduplicate the device, thereby filtering out duplicate information, and when connecting the device, the ability to support the peer device can be obtained, so that the optimal connection can be selected according to the business and scene. Technology and connectivity are connected to enhance the user experience.
  • FIG. 1 is a schematic diagram of an example of an application scenario provided by the present application applicable to the embodiment of the present application.
  • FIG. 2 is a schematic diagram of another example of an application scenario provided by the present application applicable to the embodiment of the present application.
  • FIG. 3 is a schematic diagram of a system architecture of an example of an electronic device provided by the present application.
  • FIG. 4 is a schematic diagram of an example of a process provided by the present application for a discovery end device to discover peripheral devices through an active discovery method.
  • FIG. 5 is a schematic diagram of an example of a process provided by the present application for a discovery terminal device to discover peripheral devices in a passive discovery manner.
  • FIG. 6 is a schematic flowchart of an example of a method for discovering and connecting an electronic device provided by an embodiment of the present application.
  • FIG. 7 is a schematic user interface diagram of an example of a user triggering a smartphone to actively discover peripheral devices according to an embodiment of the present application.
  • FIG. 8 is another example of a schematic user interface diagram in which a user triggers a smartphone to actively discover peripheral devices according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an example of BLE and Wi-Fi (2.4GHz) broadcasting service query requests on different time slots according to an embodiment of the present application.
  • FIG. 10 is a schematic flowchart of another example of a method for discovering and connecting an electronic device provided by an embodiment of the present application.
  • FIG. 11 is a schematic block diagram of an example of the structure of an electronic device provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features.
  • a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means two or more.
  • various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques.
  • article of manufacture encompasses a computer program accessible from any computer readable device, carrier or medium.
  • computer readable media may include, but are not limited to: magnetic storage devices (eg, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (eg, compact discs (CDs), digital versatile discs (DVDs) etc.), smart cards and flash memory devices (eg, erasable programmable read-only memory (EPROM), card, stick or key drives, etc.).
  • various storage media described herein can 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.
  • the electronic device in the embodiments of the present application may refer to user equipment, access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or 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 wireless or Handheld devices, computing devices or other processing devices connected to wireless modems with wired communication capabilities, in-vehicle devices, wearable devices, terminal devices in 5G networks or in future evolution of the public land mobile network (PLMN)
  • the terminal device can be a smart TV, a large-screen device, a smart screen, a smart phone, a smart speaker, a notebook computer, a tablet computer, a vehicle telematics processor (T-BOX), and vehicle equipment. This embodiment of the present application does not limit this.
  • various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques.
  • article of manufacture encompasses a computer program accessible from any computer readable device, carrier or medium.
  • computer readable media may include, but are not limited to: magnetic storage devices (eg, hard disks, floppy disks, or magnetic tapes, etc.), optical disks (eg, compact discs (CDs), digital versatile discs (DVDs) etc.), smart cards and flash memory devices (eg, erasable programmable read-only memory (EPROM), card, stick or key drives, etc.).
  • various storage media described herein can 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.
  • a variety of wireless technologies and wired technical solutions are involved in a wireless communication network, such as Bluetooth (bluetooth, BT) technology, Wi-Fi technology, NFC technology, Zigbee technology, USB technology, and cellular communication (Cellular) technology.
  • Bluetooth bluetooth
  • Wi-Fi Wireless Fidelity
  • NFC magnetic resonance
  • Zigbee Zigbee
  • USB cellular communication
  • Cellular cellular communication
  • different types of terminal devices may have the capability of communicating with multiple wireless technologies or wired technologies. Due to differences in device capabilities (such as memory size, power consumption, etc.) and the capabilities of different wireless technologies (such as transmission distance, bandwidth, etc.) , smart switches, etc.) often use different technologies to connect and communicate with other devices.
  • out-of-band (OOB) data can be used to communicate with other devices.
  • OOB is a standard processing method. Its essence is to first discover the first connection technology to discover the device, exchange the connection information of the second connection technology in the process of discovering the device, and finally connect the devices through the second connection technology. transmission of data.
  • a device discovers another device through NFC touch, and 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 transmission of data.
  • the discovery delay of the Bluetooth technology can be effectively shortened, and the NFC touch method is used instead of the Bluetooth scanning method to discover the device, thereby improving the convenience of the user's operation.
  • the present application provides a method for discovering and connecting electronic devices, using all the technologies (capabilities) of discovering devices or multiple technologies (capabilities) of discovering devices possessed by the same electronic device to discover another device at the same time.
  • One device and according to different business requirements and network environment, one or more of the optimal technologies are selected for device connection and data transmission. , the requirements of business services for the discovery and connection capabilities of devices with a variety of different technical capabilities to improve user experience.
  • FIG. 1 is a schematic diagram of an example of an application scenario applicable to an embodiment of the present application provided by the present application.
  • Fig. 1 is a schematic diagram of a home scenario.
  • the scenario shown in Fig. 1 includes a first electronic device and a second electronic device.
  • the smart phone 110 may support various technologies or capabilities for discovering devices.
  • the smart phone 110 may support: BT, Wi-Fi, NFC, Zigbee, USB, Cellular and other capabilities.
  • the large-screen device 120 supports: BT, Wi-Fi, NFC, USB, Cellular and other capabilities.
  • the method for discovering and connecting electronic devices provided in this application can be used, and the smartphone 110 can utilize BT technology, Wi-Fi, NFC, Zigbee, USB, Cellular and other technologies
  • the large-screen device 120 is discovered, and an optimal technology is selected for device connection and data transmission according to the business or network environment.
  • FIG. 1 is only exemplary, and should not impose any limitations on the application scenarios applicable to the embodiments of the present application.
  • the application scenario shown in FIG. 1 may also include other household devices, such as a personal computer, a PAD, and the like.
  • the smart phone 110 uses the smart phone 110 to discover and connect these devices, the method for discovering and connecting electronic devices provided in this application can also be used.
  • FIG. 2 is a schematic diagram of another example of an application scenario applicable to an embodiment of the present application provided by the present application.
  • Fig. 2 is a schematic diagram of a car networking scenario.
  • the scenario shown in Fig. 2 includes a first electronic device and a second electronic device.
  • the device takes the in-vehicle device 220 as an example.
  • the in-vehicle device 220 may include an electronic control unit (electronic control unit, ECU), a trip computer, an in-vehicle computer, or an in-vehicle T-BOX, etc., which are not limited in this embodiment of the present application.
  • the smart phone 210 may support various technologies or capabilities for discovering devices.
  • the smart phone 210 may support: BT, Wi-Fi, NFC, Zigbee, USB, Cellular and other capabilities.
  • the in-vehicle device 220 supports: BT, Wi-Fi, NFC, USB, Cellular and other capabilities.
  • the smartphone 210 uses the smartphone 210 to discover and connect the in-vehicle device 220, the method for discovering and connecting the electronic device provided in this application can be used, and the smartphone 210 can use the BT technology, Wi-Fi, NFC, Zigbee, USB, Cellular and other technologies
  • the in-vehicle device 220 is discovered, and an optimal technology is selected for device connection and data transmission according to the business or network environment.
  • FIG. 2 is only exemplary, and should not impose any limitations on the application scenarios applicable to the embodiments of the present application.
  • the application scenario shown in FIG. 2 may also include other in-vehicle devices, user devices, and the like.
  • the embodiments of the present application are not limited herein.
  • the BT may include classic Bluetooth and Bluetooth low energy (bluetooth low energy, BLE) Bluetooth.
  • the classic Bluetooth includes at least one of two types of Bluetooth: a Bluetooth basic rate (bluetooth basic rate, BR) and a Bluetooth enhanced data rate (bluetooth enhanced data rate, EDR).
  • FIG. 1 and FIG. 2 are only illustrative of application scenarios of the embodiments of the present application, and the methods for discovering and connecting electronic devices provided by the present application may also be applied to other scenarios, and the embodiments of the present application are not limited here. .
  • FIG. 3 is a schematic diagram of the system architecture of the electronic device provided by the present application.
  • the system architecture mainly includes: a discovery module and a connection module.
  • 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), and a network service discovery management module (NsdDiscover Mgmt) ), USB Discovery Management Module (USb Discover Mgmt), BT Discovery Management Module (BTDiscover Mgmt), Wi-Fi Discovery Management Module (Wi-Fi Discover Mgmt), and other discovery management modules, etc.
  • the connection modules include: connection management module (Connect Manager), connection state machine module (Link State Machine), USB link module (USB Channel), BT link module (BT Channel), Wi-Fi link module (Wi-Fi Channel) and other link modules, etc.
  • the system architecture of the electronic device may include two modules, the discovering device module and the discovered device module shown in FIG. 3 , and may also include any one of the discovering device module and the discovered device module. . If the electronic device includes two modules: a discovery device module and a discovered device module, the electronic device can have an active discovery function and a passive discovery function, that is, the electronic device can be a discovery end device or a discovered end device. If the electronic device includes a discovery device module but does not include a discovered device module, the electronic device has an active discovery function and 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 a discovery device module, the electronic device may have a passive discovery function but not an active discovery function, that is, the electronic device is a discovered end device.
  • the discovery device module includes two discovery modes: active discovery mode (active mode) and passive discovery mode (passive mode).
  • the Discoverable Device module also includes two discovery modes: active mode and passive mode.
  • the discovery device module is mainly responsible for managing the capabilities of the discovery end device, and the discovery device module is responsible for managing various capabilities on the discovery end device (such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular and other capabilities); and through the discovery of the connection policy management module, the underlying BT, Wi-Fi, NFC, Zigbee, USB, Cellular or other discovery capabilities are scheduled.
  • the function of the discovered device module is similar to the function of the discovered device module, and it is mainly responsible for the capabilities of the discovered end device.
  • the plug-in management module that discovers the connection capability is responsible for the registration and management of various capabilities (such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) on the device.
  • various capabilities such as BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.
  • the discovery connection policy management module is responsible for the coordination and scheduling among various capabilities (ie, various connection technologies) on the device.
  • connection management module and the connection state machine module are responsible for negotiating and suggesting connections of various capabilities (ie, various connection technologies).
  • the discovery management modules and link modules of various connection technologies are responsible for the discovery of specific connection technologies (eg, BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.) and the implementation of connection behaviors.
  • specific connection technologies eg, BT, Wi-Fi, NFC, Zigbee, USB, Cellular, etc.
  • FIG. 3 is only exemplary, and should not impose any limitation on the system architecture of the electronic device in the present application.
  • the system architecture of the electronic device may also adopt different modules, more or fewer modules, or a combination of multiple different module manners, etc. from the example shown in FIG. 3 .
  • the embodiments of the present application are not limited herein.
  • the following describes the discovering end device and the discovered end device in the embodiments of the present application.
  • the discovery end device can discover the surrounding devices with one or more services or capabilities by broadcasting packets to other surrounding devices or listening to the packets broadcast by other devices, and prompt the user to select a device or service to connect, and discover The end device will actively initiate a connection request.
  • 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.
  • the capability of the peripheral device may be understood as various wireless and wired connection technologies possessed by the peripheral device, 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 services based on the capabilities supported by the device, for example, including services such as file sharing, printing, and screen projection.
  • Discovered end device It can notify its own capabilities and services to peripheral devices by replying to the message broadcast by the discovering end device or by means of feedback monitoring, so that the capabilities and services of its own device can be perceived by the surrounding devices.
  • Feedback monitoring (or also called passive monitoring feedback mode) can be understood as: the discovering end device (that is, the listener device) subscribes to (or monitors) the information published by the discovered end device (that is, the listening device), and the discovered end device (that is, the listening device). A way of actively broadcasting a message to make the discovery end device monitor. The discovered end device will receive the connection request of the discovery end device, and then perform binding authentication or authentication process.
  • the discovered end device will notify the surrounding devices of its own device services or capabilities through active broadcast or passive monitoring feedback, and the discovery end device is the receiver of the connection action with other devices.
  • Active discovery method Active discovery means that the discovering end device actively broadcasts a service query request to the surrounding devices by broadcasting, and then waits for the discovered end device to reply to the service information or capability information it has. When receiving the service information replied by the discovered end device Or after the capability information, it is provided to the upper-level caller for calling.
  • the service query request actively broadcasted by the discovery end device can carry the conditions that the discovery end device expects to be satisfied by the discovery end device, such as: device name, device type, device capabilities (such as whether to include audio, video, etc. capabilities), service information (such as whether to support screen projection service, printing service, etc.) and so on.
  • the main purpose of the service information carried in the service query request is for the discovered device to match the desired service capability.
  • the service information may include: service name, service ID, service attribute and so on.
  • the service query request may also carry capability information of the discovery end device (for example, including: device name, device type, device capability or service capability, etc.), the purpose of which is to optimize the discovery process and reduce the subsequent discovery process interaction process. .
  • an example of a process of discovering peripheral devices by an active discovery method is a schematic diagram of a discovery end device.
  • the discovery end device is device A
  • the discovered devices include device B, device C, device D, and device X.
  • the service query request includes: capability information and/or service information that the target device needs to support.
  • the capabilities that the target device needs to support may include: one or more of BT, Wi-Fi, NFC, Zigbee, USB, Cellular and other capabilities.
  • the services that the target device needs to support may include: one or more of services such as file sharing, screen projection, and printing.
  • the service query request may further include device A's own capability information and the like.
  • device B determines whether it meets the broadcast requirements of device A according to the service query request, for example, determines whether device B supports the service query request The capabilities and services required for support. If the device B supports it, the device B replies to the device A with a message including the capabilities and services supported by the device B.
  • device C determines whether it meets the broadcast requirements of device A according to the service query request, for example, determines whether device C supports the capabilities and services required to be supported in the service query request. If device C does not support it, device C will not reply to device A with a message.
  • device D determines whether it meets the broadcast requirements of device A, for example, determines whether device D supports the capabilities and services required to be supported in the service query request. If the device D supports it, the device D replies to the device A with a message, and the message includes the capabilities and services supported by the device D.
  • device X determines whether it meets the broadcast requirements of device A, for example, determines whether device X supports the capabilities and services required to be supported in the service query request. If device X does not support it, device X will not reply to the message to device A.
  • Passive discovery method Passive discovery means that after the discovery end device passively subscribes to the service or capability information published by the surrounding devices, the discovery end device monitors the capability information or service information actively broadcasted by the discovered device.
  • an example of a process of discovering peripheral devices by a discovery terminal device in a passive discovery manner is a schematic diagram.
  • the discovery end device is device A
  • the discovered devices include device B, device C, device D, and device X.
  • 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, respectively.
  • Device A can monitor capability information and/or service information broadcast by device B, device C, device D, and device X, respectively, so that device A can acquire or discover capability information and/or service information possessed by peripheral devices.
  • the packets broadcast by the device B, the device C, the device D, and the device X respectively may also carry capability information and the like of each device itself.
  • the following describes the method for discovering and connecting an electronic device provided by the present application with reference to the scenario shown in FIG. 1 .
  • the first electronic device smart phone 110
  • the first electronic device smart phone 110
  • Wi-Fi wireless local area network
  • NFC magnetic tape
  • USB wireless personal area network
  • Zigbee wireless personal area network
  • 5GHz wireless personal area network
  • the second electronic device large-screen device 120
  • the smartphone 110 discovers the large-screen device 120 using an active discovery method.
  • a smartphone can be understood as a discovery terminal device
  • a large-screen device can be understood as a discovered terminal device or a scanning terminal device.
  • FIG. 6 is a schematic flowchart of an example of a method 300 for discovering and connecting an electronic device provided by the present application in the scenario shown in FIG. 1 .
  • the method 300 includes: S301 to S310.
  • a user triggers a smartphone to actively discover peripheral devices.
  • the user can trigger the smartphone to actively discover peripheral devices through the following two operation modes:
  • the first operation method Suppose the user needs to use the smartphone to transfer files to the large-screen device, as shown in a in Figure 7, the user opens the "File Management" application on the smartphone, and the displayed interface is as shown in Figure 7 As shown in b, the user selects a file to be shared (for example, file 1), clicks "Share", and selects a sharing method. The displayed interface is as shown in c in FIG. 7 . In this 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 networks. This way to discover other devices at the same time.
  • users can also choose any number of methods from among Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile networks according to their own needs. Assuming that there is no USB connection between the smartphone and the large screen, the user can click the selection boxes under the methods of "Bluetooth”, “Wi-Fi”, “NFC”, “Zigbee”, and “Mobile Network” to select These discovery methods discover other devices at the same time. After the user clicks the "Select All” button, the smartphone will simultaneously discover other devices around it using Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile networks. After the smartphone scans the surrounding devices, it displays the scanned device list to the user, and the device list includes the device identifiers of one or more devices.
  • the displayed device list may be as shown in d in FIG. 7 .
  • the user can select a device (such as a large-screen device) on the device list according to their needs. After the user selects a large-screen device, the smartphone and the large-screen device will automatically transfer services from both sides according to the required business and network environment. Select the optimal connection method among the connection methods supported by the device to connect, so as to transfer files.
  • the second mode of operation It is assumed that the user's purpose is only to connect the smartphone with the large-screen device, so as to facilitate the quick file transfer when there is data or file sharing in the future.
  • users can also choose any number of methods from Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile network according to their own needs.
  • the smartphone If connected, the user can click the corresponding enable buttons of "Bluetooth”, “Wi-Fi”, “NFC”, “Zigbee”, and “Mobile Network” respectively, so as to choose these discovery methods to discover other devices.
  • the smartphone After the user clicks the "Select All” button, the smartphone will simultaneously discover other devices around it using Bluetooth, Wi-Fi, NFC, USB, Zigbee, and mobile networks.
  • the smartphone scans the surrounding devices, it displays the scanned device list to the user, and the device list includes the device identifiers of one or more devices.
  • the displayed device list may be as shown in c in FIG. 8 .
  • the user can select a device (such as a large-screen device) on the device list according to their needs. After the user selects a large-screen device, the smartphone and the large-screen device will automatically transfer services from both sides according to the required business and network environment. Select the optimal connection method from the connection methods supported by the device to complete the connection between the smartphone and the large screen.
  • connection technology or capability of the device is displayed to the user.
  • the connection technology or capability supported by a device can be understood as one or more connection types supported by the device, and the user can view the connection technology supported by each device.
  • the smartphone may also display the display interface shown in d in FIG. 8 .
  • the interface shown in d in FIG. 7 may be replaced by the interface shown in d in FIG. 8 .
  • the user in addition to the above two operation modes, the user can also trigger the smartphone to actively discover peripheral devices through other operation modes, which is not limited in this embodiment of the present application.
  • the smartphone uses all the capabilities it has (BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc.), or all the capabilities it has.
  • BT wireless fidelity
  • Wi-Fi wireless fidelity
  • NFC wireless fidelity
  • USB wireless fidelity
  • Zigbee wireless fidelity
  • Cellular etc.
  • a smart phone uses BT, Wi-Fi, NFC, USB, Zigbee, and a mobile network to broadcast or send a service query request (also called a broadcast message) to surrounding devices at the same time.
  • a service query request also called the broadcast message
  • the smart phone broadcasts a service query request (called the first service query request for distinction) to the surrounding devices through BT.
  • the smartphone broadcasts a service query request to the surrounding devices through Wi-Fi (for the purpose of distinction, it is called the second service query request), and the smartphone sends a service query request to the surrounding devices through the USB method (for the purpose of distinction, it is called the third service query request).
  • Query request the smart phone broadcasts a service query request to the surrounding devices through NFC (to distinguish it, called the fourth service query request), and the smart phone broadcasts a service query request to the surrounding devices through Zigbee (to distinguish it, called the fourth service query request).
  • Five service query requests) the smart phone broadcasts a service query request (called the sixth service query request) to the surrounding devices through the mobile network (ie, cellular network (Cellular)).
  • the six service service query requests are broadcast by the smart phone at the same time.
  • the six service service query requests may be respectively used to query the capabilities of the peripheral device, or to query whether the peripheral device has certain specific capabilities.
  • the six service service query requests can also be respectively used to query the service information possessed by the peripheral device, or to inquire whether the peripheral device has certain specific service information, and the like.
  • service service query requests are sent by the smart phone at the same time.
  • "simultaneously sending or broadcasting” can be understood as within the time length of a time window, within the time window, the smartphone sends or broadcasts service query requests respectively by using multiple non-conflicting communication technologies at the same time (That is, the time periods for respectively sending or broadcasting service query requests using multiple non-conflicting communication technologies overlap in the time domain, and may be partially or completely overlapping.
  • multiple non-conflicting communication technologies can be started at the same time. send or broadcast a service query request).
  • the "simultaneous sending" in the examples of this application can be understood as: within the time granularity of a time window, the smart phone needs to use a variety of different communication technologies to send or broadcast service query requests at the same time or in a time-sharing manner.
  • sending or broadcasting simultaneously 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 Send or broadcast the first service query request, 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 are available in the time domain. There is overlap (may be partial or complete).
  • the third communication technology is used to send or broadcast the third service query request in the third time period, if there is a conflict between the third communication technology and the first communication technology or the second communication technology etc.), 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, "sending at the same time” can be understood as: using multiple non-conflicting communication technologies to respectively send or broadcast service query requests overlap in the time domain (partially or completely overlapping), while using conflicting communication technologies The time periods for respectively sending or broadcasting service query requests do not overlap in the time domain.
  • the first service query request further includes: Wi-Fi capability indication information, NFC capability indication information, USB capability indication information, Zigbee capability indication information, and mobile network capability indication information.
  • the Wi-Fi capability indication information is used to indicate that the smartphone also broadcasts a service query request by using the Wi-Fi method.
  • the NFC capability indication information is used to indicate that the smart phone also uses the NFC method to broadcast a service query request.
  • the USB capability indication information is used to indicate that the smart phone also sends a service query request by using a USB method.
  • the Zigbee capability indication information is used to indicate that the smart phone also uses the Zigbee method to broadcast a service query request.
  • the mobile network capability indication information is used to indicate that the smart phone also uses the cellular network to broadcast the service query request.
  • the first service query request further includes: BT capability indication information, where the BT capability indication information is used to indicate that the smartphone also broadcasts the service query request in a BT manner.
  • the second service query request and the second service query request respectively carry indication information for indicating that the smartphone also utilizes other capabilities it has to simultaneously broadcast or send the service query request.
  • the service query requests broadcasted in different ways respectively carry: instruction information used to instruct the smartphone to simultaneously broadcast or send the service query request by using all other capabilities it has.
  • the BT capability indication information may also be used to indicate that the smartphone also has the BT communication capability
  • the Wi-Fi capability indication information may also be used to indicate that the smartphone It also has Wi-Fi communication capability
  • the NFC capability indication information can also be used to indicate that the smartphone also has NFC communication capability
  • the USB capability indication information can also be used to indicate that the smartphone also has USB communication capability.
  • the Zigbee capability indication information can also be used to indicate that the smart phone also has Zigbee communication capability. In other words, various capability indication information can also be used to indicate that the smart phone has a certain communication capability, but does not mean that the smart phone uses the communication capability to send or broadcast a service query request.
  • the smart phone will not be able to broadcast through Bluetooth.
  • Service query request for example, if the user's smart phone supports Bluetooth communication capability, but the user turns off "Bluetooth" on the smart phone, in this case, the smart phone will not be able to broadcast through Bluetooth.
  • the Bluetooth capability indication information may be carried, and the Bluetooth capability indication information is used to indicate that the smart phone has the Bluetooth communication capability.
  • the service query request broadcast or sent by using other communication technologies may also not carry the Bluetooth capability indication information, that is, the peer device will not be informed whether the smart phone supports the Bluetooth communication capability.
  • the large-screen device in addition to carrying other capability indication information in the above six service query requests, the large-screen device is notified that the smartphone also uses other capabilities to broadcast or send service queries to the large-screen device. request, or the smartphone has some other communication capability, there are other optional means:
  • a rule is negotiated in advance between the smartphone and the large-screen device.
  • a field (such as an indication field) can be set in each query request, which is used to indicate whether the smartphone is Use other capabilities to broadcast service query requests to large-screen devices, or whether the smartphone has some other communication capability.
  • the field length is 6 bits (bits). The position of this field is fixed in each query request (for example, the nth field in each service query request), and both smart phones and large-screen devices know the position of this field and each bit on this field in advance the meaning indicated.
  • the first bit indicates whether the smart phone broadcasts the service query request in the BT mode, wherein the value of the bit is 1, indicating that the smart phone uses the BT mode to broadcast the service query request. request, the value on the bit is 0, indicating that the smart phone does not broadcast the service query request by BT mode.
  • the second bit indicates whether the smart phone uses Wi-Fi to broadcast the service query request.
  • the value of the bit is 1, which means that the smart phone uses Wi-Fi to broadcast the service query request.
  • a value of 0 on the bit indicates that the smartphone does not broadcast a service query request using Wi-Fi.
  • the third bit indicates whether the smart phone uses NFC to broadcast the service query request.
  • the value on the bit is 1, which means that the smart phone uses NFC to broadcast the service query request, and the value on the bit is 0. , indicating that the smartphone did not broadcast the service query request by NFC.
  • the fourth bit indicates whether the smartphone sends a service query request by using the USB method.
  • the value on the bit is 1, which means that the smartphone sends the service query request by using the USB method, and the value on the bit is 0. , indicating that the smartphone did not send a service query request using USB.
  • the fifth bit indicates whether the smart phone uses Zigbee to broadcast the service query request.
  • the value on the bit is 1, indicating that the smart phone uses Zigbee to broadcast the service query request, and the value on the bit is 0.
  • the sixth bit indicates whether the smartphone uses the Cellular method to broadcast the service query request, where the value of the bit is 1, indicating that the smartphone uses the Cellular method to broadcast the service query request, and the value of the bit is 0 , indicating that the smartphone did not use the Cellular method to broadcast the service query request.
  • Smartphones and large-screen devices negotiate the indication rules for this field in advance. In this way, by using this indication field, it can be implemented: Indicate whether the smart phone simultaneously broadcasts a service query request by using other capabilities it has.
  • smartphones and large-screen devices can negotiate a rule in advance: use different special strings (for example: a special string can be a specific sequence, which can be defined by: At least one of numbers, letters or special characters) respectively represent different capabilities, and these different special character strings may or may not exist in each query request. For example, there may be 6 different special strings, and the 6 different special strings represent BT, Wi-Fi, NFC, USB, Zigbee, and Cellular capabilities respectively. If there is a special character string in a certain query request, it means that the smartphone also uses the capability corresponding to the special character string to broadcast the service query request to the large-screen device, or the smartphone also has the corresponding special character string.
  • special strings for example: a special string can be a specific sequence, which can be defined by: At least one of numbers, letters or special characters
  • smartphones and large-screen devices can negotiate a rule in advance: use different special strings (for example: a special string can be a specific sequence, which can be defined by: At least one of numbers, letters or special characters)
  • the communication capability does not exist, it means that the smartphone does not use the capability corresponding to the special character 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 character string.
  • Smartphones and large-screen devices negotiate different instructions for special strings in advance. In this way, by using these different special strings, it is possible to indicate whether the smart phone uses other capabilities it has to simultaneously broadcast a service query request, or whether the smart phone also has other communication capabilities.
  • the above-mentioned six service query requests also carry a random value (also called 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 selected by the smartphone generate.
  • a random value also called a random code
  • the smartphone may 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 the multiple service query requests sent at the same time are the same, and the random values carried in the service query requests sent at different times are different.
  • Table 1 Collision table when using different technologies to broadcast messages at the same time
  • Table 1 shows the conflict situations when using different technologies to broadcast messages at the same time.
  • the "conflict” in Table 1 indicates that there is signal interference (such as channel interference or conflict in air interface timing) when two different technologies are used to broadcast messages at the same time, and a time-sharing strategy needs to be adopted. Use both techniques to broadcast messages.
  • "No conflict” means that there is no signal interference when two different technologies are used to broadcast packets at the same time, and the two technologies can be used to broadcast packets at the same time.
  • USB and NFC can always be turned on to monitor and scan, that is, regardless of whether the smartphone uses other technologies to broadcast For service query requests, both USB and NFC can be used to send and broadcast service query requests respectively.
  • BLE and Wi-Fi 2.4GHz
  • the time-sharing strategy is used to avoid air interface conflicts and broadcast on the negotiated designated channel.
  • the time-sharing strategy involves the control of specific channels at the chip level.
  • the parallel discovery method is adopted for two or more non-conflicting technologies, that is, using multiple non-conflicting technologies to broadcast the discovery device message at the same time, and using two or more conflicting technologies or channels.
  • Time-division strategy that is, on two or more conflicting technologies or channels, time-division broadcasts discovery device packets.
  • the time-sharing strategy first synchronizes the multi-chip clock strategy of the smart phone and the large-screen device, and plans the multi-chip broadcast window of the smart phone and the multi-chip scanning of the large-screen device according to the synchronized clock strategy.
  • Window strategy in which the duration of the broadcast window is shorter than the duration of the scan window.
  • the discovery device smart phone
  • the discovered device large-screen device
  • FIG. 9 is a schematic diagram of an example of BLE and Wi-Fi (2.4GHz) broadcasting service query requests on different time slots. As shown in FIG. 9 , each small box in the first row represents a time slot (slot), and the number in the small box represents the number of the time slot. For a smartphone, the various time slots shown in Figure 9 may be referred to as broadcast time slots.
  • the length of each time slot can be 1ms or 0.5ms
  • the second line represents the channel of Wi-Fi (2.4GHz)
  • a small box on the second line represents Wi-Fi (2.4GHz)
  • the number in the small box indicates the channel number (Channel Sequence).
  • a small box on the third line represents a channel of BLE, and the number in the small box represents the number of the BLE channel.
  • the Wi-Fi (2.4GHz) technology the first channel, the sixth channel, and the eleventh channel are broadcast channels.
  • the 37th channel, the 38th channel and the 39th channel are broadcast channels.
  • 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, broadcast on the first channel of Wi-Fi 2.4GHz Service query request, on the 2nd time slot, broadcast the service query request on the 6th channel of Wi-Fi 2.4GHz, on the 3rd time slot, broadcast the service query request on the 11th channel of Wi-Fi 2.4GHz .
  • the service query request is broadcast on the 37th channel of BLE, on the 5th time slot, the service query request is broadcast on the 38th channel of BLE, and on the 6th time slot, on the 39th channel of BLE
  • a service query request is broadcast on the channel.
  • a time-sharing broadcast service query request can also be implemented in a manner similar to that shown in Figure 9, so as to solve the air interface existing between different technologies conflict issues.
  • the above six service query requests are used to query whether 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.
  • the above six service query requests respectively carry: whether to have BT, Wi-Fi, USB, NFC, and Cellular capabilities, and/or whether to have services such as file sharing, printing, and screen projection.
  • the above six service query requests may also carry: the capability information of the smartphone itself (for example, including: the name of the smartphone, the device type of the smartphone, the capability or service capability of the smartphone, etc.). If the above six service query requests do not carry the capability information of the smartphone itself, then after the six service query requests, the smartphone and the large-screen device need to interact with additional broadcast packets, so that the large-screen device can obtain the smartphone own ability information. Or, the capability information of the smartphone itself is exchanged during the connection process between the smartphone and the large-screen device.
  • the capability information of the smartphone itself is exchanged during the connection process between the smartphone and the large-screen device.
  • the above-mentioned six service query requests may be sent multiple times.
  • the above-mentioned six service query requests are sent at the first moment, and at a certain moment after the first moment, the intelligent The mobile phone can repeatedly send the above-mentioned six service inquiry requests or any number of the above-mentioned six service inquiry requests.
  • the smart phone may periodically send the above six service query requests.
  • the large-screen device selects one or more technologies among BT, Wi-Fi, USB, NFC, and Cellular to monitor (also called scanning) the messages broadcast by the peripheral devices according to its own conditions.
  • a large-screen device can choose one or more of the capabilities it supports (BT, Wi-Fi, USB, NFC, and Cellular) according to the capabilities it supports, latency requirements, and power consumption. monitor.
  • the large-screen device 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 the peripheral devices at the same time, there will also be different technologies in the channel, Conflict problems of air interface timing. 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 to perform simultaneous scanning on Wi-Fi (2.4GHz) and BLE chips. Scanning may also be performed by using different technologies according to the time-sharing strategy described in S302, that is, by using the time slot relationship shown in FIG. 7, scanning by using different technologies in different time slots.
  • BLE and Wi-Fi 2.4GHz
  • Scanning may also be performed by using different technologies according to the time-sharing strategy described in S302, that is, by using the time slot relationship shown in FIG. 7, scanning by using different technologies in different time slots.
  • the respective time slots shown in FIG. 9 may be referred to as scanning time slots.
  • Wi-Fi scan is performed on the 1st channel of Wi-Fi 2.4GHz
  • Wi-Fi scan is performed on the 6th channel of Wi-Fi 2.4GHz
  • on the 3rd slot perform a Wi-Fi scan on the 11th channel of Wi-Fi 2.4GHz.
  • do a BLE scan on the 37th channel of BLE, on the 5th slot do a BLE scan on the 38th channel of BLE, on the 6th slot, on the BLE channel BLE scanning is performed on channel 39.
  • the scan can be divided into two stages, that is, a rough matching stage and an accurate matching stage:
  • Coarse matching stage When the large-screen device (discovered end device) scans, without time slot synchronization with any discovery device, in order to make it easier for the large-screen device to scan the service query request broadcast by the smartphone, the large-screen device
  • the time length of the scanning time slot of the device needs to be twice or more than the length of the broadcast time slot of the smartphone.
  • 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.
  • the time length of the broadcast time slot of the smartphone may be 1ms
  • the time length of the scanning time slot of the large-screen device may be 2ms.
  • the large-screen device as the scanning device can more easily Discover more broadcast equipment.
  • the time length of the scanning time slot of the large-screen device can be reduced from 2ms to 1ms, which is consistent with the length of the broadcast time slot of the smartphone, which is convenient for the broadcast device (ie Smartphones) interact with scanning devices (that is, large-screen devices) for broadcast data.
  • 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 and the second service query request , a third service query request, a fourth service query request, and a sixth service query request.
  • the large-screen device determines, according to the first service query request, a media access control (media access control, MAC) address corresponding to the BT of the smartphone, hereinafter referred to as the BT MAC address.
  • the MAC address corresponding to the Wi-Fi of the smartphone is determined, hereinafter referred to as the Wi-Fi MAC address.
  • the MAC address corresponding to the USB of the smartphone is determined, hereinafter referred to as the USB MAC address.
  • the MAC address corresponding to the NFC of the smartphone is determined, hereinafter referred to as the NFC MAC address.
  • the MAC address corresponding to the cellular network of the smartphone is determined, hereinafter referred to as the MAC address of the cellular network, and the MAC address of the cellular network can be understood as the smartphone network protocol (internet protocol, IP address).
  • the large-screen device determines the first service query request, the second service query request, the second service query request, the random value 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 respectively.
  • the service query request, the third service query request, the fourth service query request, and the sixth service query request all come from the same device.
  • the large-screen device can obtain the network identification information of the smartphone according to the information, 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 , 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 smart phone.
  • the network identification information of an electronic device is a set or combination of multiple addresses of the electronic device, wherein an address of the electronic device (for example, a BT MAC address) is the network identification information. an element of .
  • the network identification information may include multiple elements.
  • the number of elements included in the network identification information is expandable, that is, it can be dynamically changed.
  • 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.
  • the network identification information of the first electronic device may also include five elements, which are: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, and IP address.
  • the network identification information of the electronic device may be represented in a set or a combined manner.
  • the above-mentioned first service query request to fifth service query request may also carry the IP address of the smartphone.
  • the screen device can also obtain the IP address of the smartphone.
  • the large-screen device can also send The smart phone sends a broadcast message to inquire about the IP address and other capability information of the smart phone, so as to obtain the IP address of the smart phone.
  • the large-screen device In the process of the large-screen device discovering other devices at the same time, since the smart phone repeatedly sends service query requests, the next time the smart phone sends one or more of the above six service query requests, since the large-screen device has already obtained the And the network identification information of the smart phone is saved.
  • the large-screen device receives one or more service query requests sent by the smart phone next time, if the one or more service query requests carry the same random value, the large-screen device According to the same random value carried in the received multiple service query requests, it can be determined that the multiple service query requests are all from the same device (for example, called the first device).
  • the addresses carried by different service query requests such as: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, or multiple IP addresses.
  • the large-screen device combines the previously stored intelligence
  • the network identification information of the mobile phone, and the two are compared (for example, by calculating the distance of the data by vector), it can be determined that the first device and the smart phone are the same device, that is, the device is deduplicated, so as to filter out duplicates. information.
  • the network identification information of the device can be changed, and can be dynamically expanded and updated according to the change of the capabilities supported by the device. Therefore, the network identification information of the device can be dynamically expanded.
  • the information to identify the device can effectively prevent the device ID information from being tracked, solve the problem that the device is easily tracked when the unique ID of the device is used to identify the device in the prior art, and improve the security of the device.
  • the large-screen device 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, Then the large-screen device according to the addresses carried in one or more service query requests, such as: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, or one or more of the IP addresses, the large screen According to these address information, the device compares the two with 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, perform deduplication processing of the device to filter out Duplicate information.
  • the addresses carried in one or more service query requests such as: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, or one or more of the IP addresses
  • the large-screen device performs device discovery every 5 minutes, and the device discovered in the previous time and the device discovered in the next time also need to be discovered.
  • the broadcast content of the same device is identified as the same device, and the method of deduplication processing is the same as the above process, which is not repeated here for brevity.
  • the large-screen device when the large-screen device receives multiple service query requests and recognizes that the multiple service query requests are all from the same smartphone, the large-screen device can perform a query on the information carried in the multiple service query requests. shared. For example, in the process of device discovery at the same time, it is assumed that after the large-screen device simultaneously receives service query requests broadcast by smartphones in BT mode and Wi-Fi mode, the service query request broadcast by BT mode is different from the use of Service query requests broadcasted by Wi-Fi mode carry different amounts of data. Service query requests broadcast by Wi-Fi mode carry a large amount of data, while service query requests broadcast by BT mode carry a small amount of data.
  • the mobile phone After the mobile phone uses the service query request broadcast by Wi-Fi, it can filter and deduplicate the information carried in the service query request broadcast by Wi-Fi, so as to avoid multiple use between smartphones and large-screen devices.
  • BT mode is used for interaction, thereby saving signaling overhead and improving resource utilization.
  • the device scanned after the large-screen device and the device scanned by the large-screen device in the previous scan are matched by the grid ID of the device, and they are the same device after matching.
  • the device scanned for the next time on 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 it needs to fully synchronize the device capabilities and service information. Thus, signaling overhead is saved and resource utilization is improved.
  • the large-screen device monitors all or part of the six service query requests broadcast by the smart phone, it can select one or more of the capabilities of the large-screen device to reply to the smart phone message (ie, reply to the smartphone with a response message). For example, a large-screen device will be selected according to its own device capabilities and the requirements of the scene. Since the large-screen device is a constant power supply device, its Wi-Fi and BLE can be always on, and after receiving multiple services broadcast by smartphones After the query request, you can choose Wi-Fi or BLE to reply broadcast messages to the smartphone at the same time.
  • a large-screen device can also choose BLE and Wi-Fi from BT (BLE), Wi-Fi, USB, NFC, Cellular and other capabilities according to the power consumption of different capabilities and the delay of different capabilities.
  • BLE BLE
  • Wi-Fi Wireless Fidelity
  • USB Universal Serial Bus
  • NFC NFC
  • Cellular Wireless Fidelity
  • the large-screen device finally chooses Wi-Fi and BLE to reply to the smartphone at the same time.
  • the first message returned to the smartphone in the form of broadcast includes: Wi-Fi capability indication information, USB capability indication information, NFC capability indication information, Cellular capability indication information, and a random value (or also called a random value). is a random code).
  • the Wi-Fi capability indication information is used for whether the large-screen device has or does not have the Wi-Fi communication capability.
  • the USB capability indication information is used to indicate that the large-screen device has or does not have the USB communication capability
  • the NFC capability indication information is used to indicate that the large-screen device has or does not have the NFC communication capability
  • the Cellular capability indication information is used to indicate that the large-screen device has or does not have Cellular network communication capabilities.
  • 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 values carried in multiple pieces of information sent at the same time by the large-screen device are the same. The random values carried in the information sent in different times are different.
  • 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 the BLE communication capability.
  • the first message may also not include: BLE capability indication information.
  • the second message returned to the smartphone in the form of broadcasting includes: BT capability indication information, USB capability indication information, NFC capability indication information, Cellular capability indication information, and a random value (or also called random value). code).
  • the BT capability indication information is used to indicate that the large-screen device has or does not have the BT communication capability.
  • 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 for unique identification. For large-screen devices, the random value is the same as the random value in the first message.
  • 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.
  • the first message may also not include: Wi-Fi capability indication information.
  • the smart phone in addition to the above-mentioned manner of carrying other capability indication information in the first message and the second message respectively, the smart phone is notified that the large-screen device has other capabilities, and other capabilities may also be used. method of selection.
  • the smart phone and the large-screen device negotiate the rules in advance.
  • a field can be set in the reply message (the first message and the second message), and the field is used to indicate Large-screen devices also have other capabilities.
  • the field length is 5 bits (bits). The position of this field in each message is fixed, and both smart phones and large-screen devices know the position of this field and the meaning of each bit in this field in advance.
  • the first bit indicates whether the large-screen device has the BLE communication capability, wherein the value of the bit is 1, indicating that the large-screen device has the BLE communication capability, and the value of the bit is 0, indicating that Large-screen devices do not have BLE communication capabilities.
  • the second bit indicates whether the large-screen device has USB communication capability, wherein the value of the bit is 1, indicating that the large-screen device has USB communication capability, and the value of the bit is 0, indicating that the large-screen device does not With USB communication capability.
  • the third bit indicates whether the large-screen device has the NFC communication capability.
  • the value on the bit is 1, indicating that the large-screen device has the NFC communication capability, and the value on the bit is 0, indicating that the large-screen device does not have NFC communication. ability.
  • 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 the Cellular communication capability, where the value on the bit is 1, indicating that the large-screen device has the Cellular communication capability, and the value on the bit is 0, indicating that the large-screen device does not have Cellular communication ability.
  • the large-screen device and the smartphone negotiate the indication rules for this field in advance. In this way, by using this indication field, it is possible to indicate that the large-screen device has other capabilities.
  • large-screen devices and smart phones can negotiate a rule in advance: use different special strings (for example: a string can be a specific sequence, which can be composed of numbers: , letters or at least one of special characters) represent different abilities respectively.
  • these different special character strings may or may not exist in each reply message (the first message and the second message), for example, there may be 5 different special character strings, and the 5 different special character strings are respectively Indicates BT communication capability, Wi-Fi communication capability, NFC communication capability, USB communication capability, and Cellular communication capability. If there is a special string in a message, it means that the large-screen device also has the communication capability corresponding to the special string.
  • the large-screen device does not have the communication capability corresponding to the special string.
  • Large-screen devices and smartphones negotiate the instructions for special strings in advance. In this way, by using these different special strings, it is possible to indicate that the large-screen device also has other communication capabilities.
  • the first message and the second message may also respectively 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, after the first message and the second message, the large-screen device and the smartphone need to interact with additional broadcast messages, so that the smart phone The mobile phone obtains other capabilities or service information of the large-screen device. Or, during the connection process between the smartphone and the large-screen device, other capabilities or service information of the large-screen device are exchanged.
  • other capabilities or service information of the large-screen device are exchanged.
  • 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 capability and target according to the target capability or target service information carried in the service query request.
  • service if the target capability and target service are satisfied, reply the first message and the second message to the smartphone.
  • the first message and the second message may also carry indication information, which is used to indicate that the large-screen device has the target capability or the target service. details.
  • indication information exists in the first message and the second message respectively, and the indication information is used to indicate that the large-screen device has capabilities such as BT, Wi-Fi, USB, NFC, and Cellular, and supports file sharing services and screen projection services. If the target capability or target service is not satisfied, the large-screen device will not reply the first message and the second message to the smartphone. Alternatively, if the target capability or target service is not met, the large-screen device will also reply to the smartphone with a first message and a second message, where the first message and the second message include: an indication indicating that the target capability or target service is not available information.
  • the smart phone after receiving the first message replied by the large-screen device in the BT mode and the second message in the Wi-Fi mode, the smart phone also obtains the network identification information of the large-screen device.
  • the smartphone 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.
  • the smart phone may also obtain the IP address of the large-screen device, and the smart phone determines that both the first message and the second message come from the same smart phone according to the random value carried in the first message and the second message.
  • the smart phone can obtain the network identification information of the large-screen device according to the information, the network identification information includes: BT MAC, Wi-Fi MAC. IP.
  • the network identification information is used to uniquely identify the large-screen device.
  • 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. The two parameters 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.
  • the above-mentioned first message and second message may respectively carry the IP address of the large-screen device.
  • the smart phone can obtain the IP address of the large-screen device.
  • the smartphone can also send a broadcast message to the large-screen device to inquire about the large-screen device.
  • the IP address of the screen device can be obtained to obtain the IP address of the large screen device.
  • the large-screen device will also repeatedly reply to the smartphone.
  • the smartphone After receiving the reply information from the screen device, since the smartphone has acquired and saved the network identification information of the smartphone, the next time the smartphone receives the large-screen device, it will use a different method (such as BT, Wi-Fi, USB, NFC, Cellular, etc.)
  • a different method such as BT, Wi-Fi, USB, NFC, Cellular, etc.
  • the smartphone After sending one or more messages in one or more ways), if the one or more messages all carry the same random value, the smartphone will receive the same random value according to the one or more received , since the same random values carried in one or more of them are the same, the smart phone can determine that one or more messages are from the same device (for example, called the second device), and further, according to one or more messages
  • the addresses carried respectively such as: BT MAC address, Wi-Fi MAC address, USB MAC address, NFC MAC address, and IP address.
  • the smartphone Based on these information, the smartphone combines the previously stored network identification information of the large-screen device , and compare the two (for example, by calculating the distance of the data through a vector), it can be determined that the second device and the large-screen device are the same device, that is, the deduplication process of the device is performed.
  • 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 the change of 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.
  • the smartphone can use the addresses carried in the one or more messages respectively, such as: BT MAC address, Wi-Fi MAC address, USB One or more of MAC address, NFC MAC address, and IP address. Based on these address information, the smartphone can compare the two with the previously stored network identification information of the large-screen device, and can also determine the second device and the large-screen device.
  • the device is the same device, that is, the deduplication process of the device is performed.
  • the smartphone performs device discovery every 5 minutes, and the device discovered in the previous time and the device discovered in the next time also need to be deduplicated. , to identify the broadcast content of the same device as the same device.
  • the deduplication processing method is the same as the above-mentioned process, and is not repeated here for the sake of introduction.
  • the smartphone since in S302, the smartphone uses a broadcast method to query the surrounding broadcast services in various ways, therefore, in S306, the smartphone can not only receive a reply from the large-screen device In addition to messages from other devices, you may also receive messages from other devices.
  • the smartphone After the smartphone receives the message replied by the other device, it can also acquire and store the network identification information corresponding to the other device, so as to uniquely identify a device. Using the network identification information, the smart phone can perform deduplication processing of the device after receiving multiple messages replied by the device.
  • the large-screen device After the smart phone receives the first message replied by the large-screen device in the BT mode and the second message replied in the Wi-Fi mode, and acquires the network identification information of the large-screen device, the large-screen device It is recognized that both the first message and the second message are from the large-screen device, so the smartphone can combine and share the contents of the first message and the second message (for example, the device information, capability information, resolution, Bit rate, decoding rate, size of transmitted data packets, etc.), thus avoiding the smart phone using BT to discover large-screen devices, and after negotiating capabilities with the large-screen device through BT, the smart phone has Wi-Fi-based services. Smartphones also need to use Wi-Fi to discover large-screen devices and conduct capability negotiation with large-screen devices, which reduces signaling interaction, improves resource utilization, and improves user experience for distributed services. .
  • the information sent by the BT method is different from the information sent by the Wi-Fi method.
  • the amount of data carried by the information is different.
  • the information sent by Wi-Fi has a large amount of data, while the information sent by BT has a small amount of data.
  • the smartphone After the smartphone receives the information sent by the large-screen device using Wi-Fi, it The content of the information sent by Wi-Fi can be filtered and deduplicated, which can avoid multiple interactions between smartphones and large-screen devices using BT mode, thereby saving signaling overhead and improving resource utilization. .
  • the device discovered by the smartphone and the device discovered by the smartphone at the previous time are matched by grid identifiers, if they are the same device after matching, the device discovered by the smartphone at the next time is the same device.
  • the device can share the device capabilities or service information previously discovered by the smartphone.
  • the smartphone only needs to synchronize some device capabilities or service information. It needs to fully synchronize the device capabilities and service information, thereby saving signaling overhead and improving resource utilization. utilization.
  • the smartphone performs de-duplication processing on the device information discovered through multiple wireless and wired technologies (capabilities), and displays the identifiers of the remaining multiple different devices after the de-duplication processing to the user, that is, displays the device list to the user .
  • the display interface may be as shown in d in FIG. 8 .
  • the user can select a large-screen device from multiple device lists as required, and then connect with the large-screen.
  • the smart phone in addition to the user manually selecting the target device to be connected in the multiple device lists, can also automatically select the target device according to preset conditions.
  • 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, and the like.
  • the embodiments of the present application are not limited.
  • the smartphone sends a connection request to the large-screen device.
  • the connection request includes: standard request information defined in a protocol corresponding to one or more optimal connection methods (such as Wi-Fi, Bluetooth, etc.), for example, may include a connection address, connection window, etc. , safety requirements, etc.
  • the smart phone will be based on the capabilities supported by itself and the capabilities supported by the peer device (large-screen device), and further, in combination with the service information to be transmitted, in BT, Wi-Fi, NFC, USB , Zigbee, and mobile network. Choose one or more optimal ways to connect to the large-screen device.
  • a connection strategy can be predefined, for example, both smart phones and large-screen devices support USB, Wi-Fi (5GHz), Wi-Fi P2P (5GHz), In the case of Wi-Fi (2.4GHz), Wi-Fi P2P (2.4GHz), BR/EDR, BLE and other capabilities, for large-bandwidth services, during near-field transmission, the priority is from high to low.
  • the different capabilities are sorted in the following order: USB>Wi-Fi(5GHz)>Wi-Fi P2P(5GHz)>Wi-Fi(2.4GHz)>Wi-Fi P2P(2.4GHz)>BR/EDR>BLE.
  • Ethernet Ethernet
  • Wi-Fi Wi-Fi>Cellular.
  • the smartphone can connect to the large-screen device according to the above-mentioned priorities of different capabilities, and among the capabilities supported by the smartphone and the large-screen device, the method with the highest priority is selected. Or, select the first several methods with higher priority to connect with large-screen devices.
  • the smartphone can monitor the communication delay in each connection process, Bandwidth information, etc., dynamically adjust the way to establish a connection with the large-screen device in the future, and dynamically adjust the priority order of different capabilities.
  • the large-screen device determines the connection method (for example, any one of BT, Wi-Fi, USB, NFC, Cellular) carried in the connection request according to the information carried in the connection request. ), according to the connection method, a communication connection is established between the large-screen device and the smartphone.
  • the connection method for example, any one of BT, Wi-Fi, USB, NFC, Cellular
  • the smart phone supports the Bluetooth communication capability, and the "Bluetooth" on the smart phone is in an open state.
  • Large-screen devices also support Bluetooth communication capabilities, but “Bluetooth” is turned off on large-screen devices.
  • the smart phone has clearly learned that the large-screen device supports the Bluetooth communication capability, or if the smart phone is not sure whether the large-screen device supports the Bluetooth communication capability, the user hopes to use the Bluetooth method to establish a connection between the smart phone and the large-screen device.
  • the connection request received by the large-screen device carries information such as the connection address, connection window, and security requirements required for the Bluetooth connection.
  • the large-screen device first automatically turns on "Bluetooth", or the large-screen device will prompt the user to turn on the "Bluetooth” of the large-screen device.
  • the smartphone can communicate with the large-screen device. to establish a Bluetooth connection. If the large-screen device does not support the Bluetooth communication capability, or, although the large-screen device supports the Bluetooth communication capability, but temporarily does not allow "Bluetooth” to be turned on, the large-screen device may prompt the user that the large-screen device does not support Bluetooth connection temporarily. Optionally, the large-screen device will not respond to connection requests sent by the smartphone. Alternatively, the large-screen device can also reply to the smartphone to notify the smartphone that the large-screen device does not support Bluetooth connection temporarily. In this case, the smartphone cannot establish a Bluetooth connection with the large-screen device, but the smartphone A connection based on other methods (such as Wi-Fi) can be established between the device and the large-screen device.
  • the large-screen device supports the Bluetooth communication capability, and "Bluetooth" on the large-screen device has been turned on.
  • Smartphones also support Bluetooth communication capabilities, but “Bluetooth” on the smart phone is turned off, and users want to use Bluetooth to connect the smart phone with the large-screen device.
  • the smartphone will prompt the user to turn on the "Bluetooth” of the smartphone.
  • the connection request sent by the smartphone to the large-screen device will carry the required connection for the Bluetooth connection. Information such as address, connection window, security requirements, etc.
  • a Bluetooth connection can be established between the smartphone and the large-screen device.
  • the smartphone will prompt the user that the smartphone temporarily does not support Bluetooth connectivity.
  • 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 for the Bluetooth connection.
  • a Bluetooth connection cannot be established between the smartphone and 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.
  • the smartphone will combine all communications currently supported by the smartphone.
  • a Wi-Fi connection cannot be established between the smartphone and 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.
  • the large-screen device will combine the current state of the large-screen device.
  • the usage of all supported communication technologies according to the connection request sent by the smartphone, select one or more communication technologies (such as Bluetooth, etc.) from the communication technologies other than Wi-Fi communication methods to establish a communication connection with the large-screen device .
  • the large-screen device can also reply to the smartphone to notify the smartphone that the large-screen device does not support Wi-Fi connection temporarily.
  • connection request sent by the smartphone to the large-screen device is Carrying information such as the connection address, connection window, security requirements and other information required for Wi-Fi connection
  • the smartphone cannot establish a Wi-Fi connection with the large-screen device, but the smart phone and the large-screen device can be established based on other methods (such as Bluetooth).
  • a connection between a smartphone and a large-screen device may be established at the same time and there are multiple different technologies.
  • a BT connection and a Wi-Fi connection can exist simultaneously between a smartphone and a large-screen device.
  • the smart phone can transmit the data stream of the service to the large-screen device, and data communication is started between the two.
  • the smartphone in the case where there are multiple connections between the smartphone and the large-screen device at the same time, the smartphone can select the optimal one, or simultaneously select multiple connections to the large-screen device.
  • the device transmits data.
  • the method for discovering and connecting an electronic device utilizes all the technologies (capabilities) of all devices to discover devices or multiple technologies (capabilities) of all devices to discover devices possessed by the same electronic device to actively broadcast or send messages at the same time, which satisfies Under heterogeneous network conditions, business services require devices with different technical capabilities to discover and connect to improve user experience.
  • using the network identifier of the device to identify a device can avoid the problem of being easily tracked when the unique device ID is commonly used in the industry to identify the device, can effectively prevent the device ID information from being tracked, improve the security of the device, and at the same time meet the needs of the current industry.
  • the network identifier changes dynamically.
  • the network identification of the device is used to deduplicate the device, thereby filtering out duplicate information, enabling multiple discovery connection technologies to be used in parallel, and improving the efficiency of device discovery.
  • the ability to support the peer device can be obtained, so that the optimized connection technology and connection capability can be selected according to the business and scene, and the user experience can be improved.
  • FIG. 10 is a schematic flowchart of an example of a method 400 for discovering and connecting an electronic device provided by the present application in the scenario shown in FIG. 2 .
  • the smartphone 210 used by the user has capabilities such as BT, Wi-Fi, NFC, USB, Cellular, etc.
  • the Wi-Fi can include two frequencies of 2.4GHz and 5GHz, respectively using Wi-Fi (2.4GHz) and Wi-Fi (5GHz) are indicated.
  • the in-vehicle device 220 supports a variety of capabilities such as BT, Wi-Fi, and USB.
  • the smartphone 210 can simultaneously monitor the packets broadcast by the peripheral devices through various capabilities such as BT, Wi-Fi, NFC, USB, and Cellular.
  • the in-vehicle device has BT, Wi-Fi, and USB capabilities, and the in-vehicle device 220 can use the broadcast capabilities of BT, Wi-Fi, and USB to let the smartphone 210 discover the existence of the in-vehicle device 220 , thereby completing the connection between the smartphone 210 and the in-vehicle device 220 and data communication.
  • the smartphone 210 discovers the in-vehicle device 220 using a passive discovery method. It is assumed that the smartphone 210 and the in-vehicle device 220 have been connected using USB.
  • a smartphone can be understood as a discovery terminal device, and a large-screen device can be understood as a discovered terminal device or a scanning terminal device.
  • the method 400 includes: S401 to S408.
  • the smart phone subscribes to or monitors the service or capability information published by the in-vehicle device.
  • the in-vehicle device actively sends and broadcasts its own device or service information.
  • the in-vehicle device can use all the capabilities (BT, Wi-Fi, NFC, USB, etc.) it has, or multiple capabilities among all the capabilities it has to broadcast or send messages at the same time.
  • the messages broadcast or sent in different ways carry the capability information of the in-vehicle device, and further, can also carry the service information of the in-vehicle device (for example, including: the name of the in-vehicle device, the device type of the in-vehicle device, the in-vehicle device support for file sharing, screencasting and other services).
  • the in-vehicle device uses BT, Wi-Fi, NFC, and USB to broadcast or send messages at the same time.
  • the first packet broadcast in the BT mode carries: Wi-Fi capability indication information, NFC capability indication information, and USB capability indication information.
  • the Wi-Fi capability indication information is used to indicate that the in-vehicle device also uses the Wi-Fi method to broadcast the message
  • the NFC capability indication information is used to indicate that the in-vehicle device also uses the NFC method to broadcast the message
  • the USB capability indication information is used for Indicates that the in-vehicle device also uses the USB method to send the message.
  • the first message further includes: BT capability indication information, where the BT capability indication information is used to indicate that the in-vehicle device also uses the BT mode to broadcast the message.
  • the messages sent or broadcast by Wi-Fi, NFC, and USB respectively carry messages used to indicate that the in-vehicle device also uses other methods to simultaneously broadcast or send messages.
  • the messages broadcasted in different ways respectively carry: indication information used to instruct the in-vehicle device to simultaneously broadcast or send the message by using all other capabilities of the in-vehicle device.
  • the BT capability indication information may also be used to indicate that the in-vehicle device also has the BT communication capability
  • the Wi-Fi capability indication information may also be used to indicate the in-vehicle device. It also has Wi-Fi communication capability
  • the NFC capability indication information can also be used to indicate that the in-vehicle device also has NFC communication capability.
  • the USB capability indication information can also be used to indicate that the in-vehicle device also has a USB communication capability.
  • various capability indication information can also be used to indicate that the in-vehicle device has a certain communication capability, but does not mean that the in-vehicle device uses the communication capability to send or broadcast a message.
  • the in-vehicle device in addition to the manner of carrying other capability indication information in the above-mentioned four messages, the in-vehicle device is notified that the smartphone also utilizes other capabilities to broadcast or send a service query request to the in-vehicle device.
  • the specific solution is similar to that in the method 300, and the corresponding description may refer to the relevant description in S302 in the method 300, which is not repeated here for brevity.
  • the above-mentioned four messages also carry a random value (also called a random code), respectively, and the random values carried by the six service query requests are all the same, and the random value is generated by the vehicle-mounted device.
  • a random value also called a random code
  • the in-vehicle device broadcasts messages simultaneously through all its own capabilities (BT, Wi-Fi, NFC, USB, Zigbee, Cellular, etc.)
  • the corresponding protocol stipulates that there may be conflict problems such as channel and air interface timing when using multiple different technologies to broadcast messages, that is, there may be interference between messages broadcast by different technologies.
  • the collision avoidance mechanism described in the method 300 may be used.
  • the specific solution is similar to that in the method 300, and the corresponding description may refer to the relevant description in S302 in the method 300, which is not repeated here for brevity.
  • the above-mentioned four packets may be sent multiple times.
  • the above-mentioned four packets are sent at the first moment, and at a certain moment after the first moment, the in-vehicle device may The above-mentioned four packets or any number of the above-mentioned four packets are repeatedly sent.
  • the in-vehicle device may periodically send the above four packets.
  • the smartphone selects one or more technologies among BT, Wi-Fi, USB, NFC, and Cellular to monitor the messages broadcast by the peripheral devices according to its own conditions.
  • a smartphone can choose one or more of the capabilities it supports (BT, Wi-Fi, USB, NFC, and Cellular) to monitor based on the capabilities it supports, 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 is monitoring for a large-screen device, and S403 is monitoring for a smart phone, other than that, other specific processes are the same, and will not be repeated here.
  • the smartphone monitors all or part of the four packets broadcast by the in-vehicle device, it is assumed that the smartphone monitors the first packet, the second packet, the third packet, and the fourth packet. arts.
  • the smartphone determines the MAC address corresponding to the BT capability of the in-vehicle device according to the first message, hereinafter referred to as the BT MAC address.
  • the MAC address corresponding to the Wi-Fi capability of the in-vehicle device is determined, hereinafter referred to as the Wi-Fi MAC address.
  • the MAC address corresponding to the NFC capability of the smartphone is determined, hereinafter referred to as the NFC MAC address.
  • the MAC address corresponding to the USB capability of the in-vehicle device is determined, hereinafter referred to as the USB MAC address.
  • the smartphone determines the first packet, the second packet, the third packet, and the fourth packet according to the random values carried by the first packet, the second packet, the third packet, and the fourth packet, respectively. from the same device.
  • the smart phone can obtain the network identification information of the in-vehicle device based on this information.
  • the network identification information includes: BT MAC, Wi-Fi MAC, USB MAC, and NFC MAC, that is, the network identification information includes four parameters of the in-vehicle device.
  • the parameters are: the BT MAC address of the in-vehicle device, the Wi-Fi MAC address of the in-vehicle device, the USB MAC address of the in-vehicle device, and the NFC MAC address of the in-vehicle device.
  • the network identification information is used to uniquely identify the in-vehicle device.
  • the above-mentioned first to fourth packets may also carry the IP addresses of the in-vehicle devices.
  • the smart phone The IP address of the in-vehicle device can also be obtained to obtain the network identification information of the in-vehicle device.
  • the network identification information includes: BT MAC, Wi-Fi MAC, USB MAC, NFC MAC, and IP address.
  • the network identification information includes the Five parameters, these five parameters are: the BT MAC address of the on-board device, the Wi-Fi MAC address of the on-board device, the USB MAC address of the on-board device, the NFC MAC address of the on-board device, and the IP address of the on-board device.
  • the smartphone may also send a broadcast message to the in-vehicle device. Inquire the IP address of the in-vehicle device to obtain the IP address of the in-vehicle device.
  • the smart phone can use the network identification information of the vehicle-mounted device to perform deduplication processing of the device and share information between different technologies.
  • S304 De-duplication is performed for large-screen devices, while S404 is de-duplicated for smartphones.
  • S304 De-duplication is performed for large-screen devices
  • S404 is de-duplicated for smartphones.
  • other specific processes are the same, which will not be repeated here.
  • the smartphone performs deduplication processing on the device information discovered through various wireless and wired technologies (capabilities), and displays the identifiers of the remaining multiple different devices after deduplication processing to the user, that is, displays the device list to the user.
  • the display interface may be as shown in d in FIG. 8 .
  • the user can select the in-vehicle device from the multiple device lists as required, and then connect with the in-vehicle device.
  • the smart phone in addition to the user manually selecting the target device to be connected in the multiple device lists, can also automatically select the target device according to preset conditions.
  • 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, and the like.
  • the embodiments of the present application are not limited.
  • connection request includes: standard request information defined in a protocol corresponding to one or more optimal connection methods (eg, Wi-Fi, Bluetooth, etc.), for example, may include information such as connection address, connection window, and security requirements.
  • standard request information defined in a protocol corresponding to one or more optimal connection methods eg, Wi-Fi, Bluetooth, etc.
  • the smart phone will, according to its own supported capabilities and the capabilities supported by the peer device (vehicle device), further, in combination with the service information to be transmitted, in BT, Wi-Fi, NFC, USB, etc. choose an optimal way or multiple ways from Zigbee and mobile network to connect to the large-screen device.
  • the peer device vehicle device
  • the service information to be transmitted in BT, Wi-Fi, NFC, USB, etc.
  • the in-vehicle device determines, according to the information carried in the connection request, the connection method (for example, any one or more of BT, Wi-Fi, USB, and NFC) carried in the connection request. ), depending on the connection method, a communication connection is established between the in-vehicle device and the smartphone.
  • the connection method for example, any one or more of BT, Wi-Fi, USB, and NFC
  • connections of various different technologies may be established between the smartphone and the in-vehicle device.
  • a BT connection and a Wi-Fi connection can be established simultaneously between a smartphone and an in-vehicle device.
  • the smartphone in the case that there are multiple connections between the smartphone and the in-vehicle device at the same time, the smartphone can select the optimal one, or simultaneously select a plurality of them to transmit to the in-vehicle device at the same time data.
  • the method for discovering and connecting an electronic device utilizes all the technologies (capabilities) of discovering devices or multiple of the technologies (capabilities) of discovering devices possessed by the electronic device to actively monitor the messages broadcast by the peripheral devices at the same time, and , the peripheral device uses all the technologies (capabilities) of all the devices it has to discover the device or a variety of the technologies (capabilities) of all the devices it has to actively broadcast the message at the same time, which satisfies the conditions of the heterogeneous network.
  • a variety of devices with different technical capabilities are required to discover connectivity capabilities to improve user experience.
  • the network identifier of the device can avoid the problem of being easily tracked when the unique device ID is commonly used in the industry to identify the device, can effectively prevent the device ID information from being tracked, improve the security of the device, and at the same time meet the needs of the current industry.
  • the network identifier changes dynamically.
  • the network identification of the device is used to deduplicate the device, thereby filtering out duplicate information, enabling multiple discovery connection technologies to be used in parallel, and improving the efficiency of device discovery.
  • the ability to support the peer device can be obtained, so that the optimized connection technology and connection capability can be selected according to the business and scene, and the user experience can be improved.
  • Embodiments of the methods for discovering and connecting electronic devices provided by the embodiments of the present application are described above with reference to FIGS. 1 to 10 , and the electronic devices provided by the embodiments of the present application are described below.
  • the electronic device (including the above-mentioned first electronic device and the second electronic device) can be divided into functional modules.
  • each function may be divided into various function modules, or two or more functions may be integrated into one processing module.
  • the above-mentioned 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, and there may be other division manners in actual implementation.
  • the electronic device provided by the embodiment of the present application is used to execute the above method.
  • the embodiment provides any method for discovering and connecting an electronic device, so the same effect as the above implementation method can be achieved.
  • the electronic device may include a processing module, a memory module and a communication module.
  • the processing module may be used to control and manage the actions of the electronic device. For example, it may be used to support the electronic device to perform the steps performed by the processing unit.
  • the memory 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.
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • FIG. 11 shows a schematic diagram of the hardware structure of an example of an electronic device 500 provided in this application.
  • the electronic device 500 may be a smartphone, a large-screen device, or a vehicle-mounted device in the foregoing method embodiments.
  • 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 charge management module 540 , a power management module 541 , and a battery 542 , Antenna 1, Antenna 2, wireless communication module 550, etc.
  • USB universal serial bus
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 500 .
  • the electronic device 500 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • Processor 510 may include one or more processing units.
  • the processor 510 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video Codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc.
  • AP application processor
  • GPU graphics processing unit
  • ISP image signal processor
  • controller a video Codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • NPU neural-network processing unit
  • different processing units may be independent components, or may be integrated in one or more processors.
  • electronic device 500 may also include one or more processors 510 .
  • the controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing instructions.
  • the processor 510 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface, and/or USB interface, etc.
  • the USB interface 530 is an interface that conforms to the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • 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.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 500 .
  • the electronic device 500 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the wireless communication function of the electronic device 500 may be implemented by the antenna 1 , the antenna 2 , the wireless communication module 550 and the like.
  • the wireless communication module 550 can provide Wi-Fi (including Wi-Fi perception and Wi-Fi AP), Bluetooth (bluetooth, BT), NFC, USB, Zigbee, mobile network, wireless data transmission modules applied on the electronic device 500 (For example, 433MHz, 868MHz, 515MHz) and other wireless communication solutions.
  • the wireless communication module 550 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 550 receives electromagnetic waves via the antenna 1 or the antenna 2 (or, the antenna 1 and the antenna 2 ), filters and frequency modulates the electromagnetic wave signals, and sends the processed signals to the processor 510 .
  • the wireless communication module 550 can also receive the signal to be sent from the processor 510, perform frequency modulation on it, amplify it, and then convert it into electromagnetic waves and radiate it out through the antenna 1 or the antenna 2.
  • 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 realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 521 may be used to store one or more computer programs including instructions.
  • the processor 510 may execute the above-mentioned instructions stored in the internal memory 521, thereby causing the electronic device 500 to execute the methods for discovering and connecting electronic devices, various applications and data processing provided in some embodiments of the present application.
  • the internal memory 521 may include a code storage area and a data storage area. Among them, the code storage area can store the operating system.
  • the data storage area may store data and the like created during the use of the electronic device 500 .
  • the internal memory 521 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), and the like.
  • the processor 510 may execute the instructions stored in the internal memory 521 and/or the instructions stored in the memory provided in the processor 510 to cause the electronic device 500 to execute any of the functions provided in the embodiments of the present application. A method of discovering and connecting electronic devices, as well as other applications and data processing.
  • the electronic device 500 includes, but is not limited to, smart TVs, large-screen devices, mobile phones, tablet computers, notebooks, large-screen TVs, smart home items, PDAs, POS, in-vehicle computers, and the like.
  • smart TVs large-screen devices
  • mobile phones tablet computers
  • notebooks large-screen TVs
  • smart home items PDAs
  • POS in-vehicle computers
  • the embodiments of the present application are not limited herein.
  • each unit in the above apparatus can be realized in the form of software calling through the processing element; also can all be realized in the form of hardware; some units can also be realized in the form of software calling through the processing element, and some units can be realized in the form of hardware.
  • each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function.
  • the processing element may also be called a processor, which may be an integrated circuit with signal processing capability.
  • each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
  • a unit in any of the above apparatuses may be one or more integrated circuits configured to implement the above methods, eg, one or more application specific integrated circuits (ASICs), or, one or more A plurality of digital signal processors (DSPs), or, one or more field programmable gate arrays (FPGAs), or a combination of at least two of these integrated circuit forms.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • FPGAs field programmable gate arrays
  • the processing element can be a general-purpose processor, such as a central processing unit (central processing unit, CPU) or other processors that can invoke programs.
  • CPU central processing unit
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • Embodiments of the present application further provide a system for a method for discovering and connecting electronic devices, the system comprising: the first electronic device (such as a smart phone) provided in the above method embodiments, a second electronic device (such as a large screen) equipment or in-vehicle equipment).
  • the first electronic device such as a smart phone
  • a second electronic device such as a large screen equipment or in-vehicle equipment.
  • Embodiments of the present application further provide a computer-readable storage medium for storing computer program codes, where the computer program includes instructions for executing any one of the methods for discovering and connecting electronic devices provided by the above embodiments of the present application.
  • the readable medium may be a read-only memory (read-only memory, ROM) or a random access memory (random access memory, RAM), which is not limited in this embodiment of the present application.
  • the present application also provides a computer program product, the computer program product includes instructions, when the instructions are executed, to cause the first electronic device and the second electronic device to perform operations corresponding to the above-mentioned methods 300 and 400 .
  • An embodiment of the present application further provides a chip located in a communication device, the chip includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface, a pin or a circuit, etc.
  • the processing unit can execute computer instructions, so that the communication apparatus executes any one of the methods for discovering and connecting electronic devices provided by the foregoing embodiments of the present application.
  • the computer instructions are stored in a storage unit.
  • the storage unit is a storage unit in the chip, such as a register, a cache, etc.
  • the storage unit can also be a storage unit in the terminal located outside the chip, such as ROM or other storage units that can store static information and instructions. Types of static storage devices, random RAM, etc.
  • the processor mentioned in any one of the above may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the program execution of the above-mentioned transmission method of feedback information.
  • the processing unit and the storage unit can be decoupled, respectively disposed on different physical devices, and connected in a wired or wireless manner to implement the respective functions of the processing unit and the storage unit, so as to support the system chip to implement the above embodiments various functions in .
  • the processing unit and the memory may also be coupled on the same device.
  • the communication device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, for the beneficial effects that can be achieved, reference may be made to the above-provided method. The beneficial effects in the corresponding method will not be repeated here.
  • the memory in this embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory may be ROM, programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM) , EEPROM) or flash memory.
  • Volatile memory can be RAM, which acts as an external cache.
  • RAM random access memory
  • DRAM dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double data rate Synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
  • enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
  • synchronous link dynamic random access memory direct memory bus random access memory Access memory
  • direct rambus RAM direct rambus RAM
  • the methods in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented in 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.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer program or instructions may be stored in or transmitted over a computer-readable storage medium.
  • the computer-readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server that integrates one or more available media.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • 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, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a readable storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned readable storage medium includes: U disk, removable hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供了一种发现和连接电子设备的方法以及电子设备,该方法包括:第一电子设备在第一时间段(或第一时间窗)内利用第一通信技术广播报文,第一电子设备在第二时间段(或第一时间窗内)内利用第二通信技术广播报文,第一时间段和第二时间段有重叠;接收第二电子设备发送的响应信息;根据第二电子设备支持的通信技术能力与第二电子设备之间建立通信连接。本申请提供的方法,利用电子设备具有的所有通信技术能力(例如BT、Wi-Fi、NFC、Zigbee、USB、Cellular等)中的多种同时广播或同时发送报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高设备发现的效率。

Description

发现和连接电子设备的方法以及电子设备
本申请要求于2021年3月31日提交国家知识产权局、申请号为202110351238.9、申请名称为“发现和连接电子设备的方法以及电子设备”的中国专利申请的优先权,以及于2021年7月20日提交国家知识产权局、申请号为202110821297.8、申请名称为“发现和连接电子设备的方法以及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,更为具体的,涉及一种发现和连接电子设备的方法以及电子设备。
背景技术
在无线通信网络中涉及多种无线技术和有线技术方案,比如蓝牙(bluetooth,BT)技术、无线保真技术(wireless-fidelity,
Figure PCTCN2022083364-appb-000001
)技术、近场通信(near field communication,NFC)技术、紫峰(Zigbee)技术、通用串行总线(universal serial bus,USB)技术、蜂窝通信(Cellular)技术等。当某一个设备具备多种无线技术和有线技术的能力时,会根据传输的业务类型、不同的无线技术和有线技术能力差异(例如传输远近、带宽高低等),采用其中的一种技术去发现其他设备,并且与其他设备之间建立通信连接和数据的传输。但是这种方法无法满足在异构网络架构中,业务服务对具有多种无线技术能力设备的需求,用户体验较差。
发明内容
本申请提供了一种发现和连接电子设备的方法以及电子设备。利用一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时去发现另一个设备,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。
第一方面,提供了一种发现和连接电子设备的方法,该方法包括:第一电子设备在第一时间段内,利用第一通信技术广播第一报文,该第一报文用于查询其它设备具有的通信技术能力;该第一电子设备在第二时间段内,利用第二通信技术广播第二报文,该第二报文用于查询其它设备具有的通信技术能力,该第一时间段和该第二时间段有重叠;该第一电子设备接收第二电子设备发送的响应信息(一个或者多个响应信息);该第一电子设备根据响应信息,确定该第二电子设备支持的通信技术能力;该第一电子设备根据第二电子设备支持的通信技术能力,与该第二电子设备之间建立通信连接。
第一方面提供的发现和连接电子设备的方法,第一电子设备利用多种通信技术在重叠的时间段上分别广播报文,即利用多种不同的通信技术分别广播报文的时间段在 时域上是有重叠的(部分重叠或者全部重叠)。即利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送(同时广播)报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,可以主动地发现更多的支持分布能力的设备,实现了支持多种发现连接技术的融合,提高发现和连接电子设备的效率,提高用户体验。
在第一方面一种可能的实现方式中,该方法还包括:该第一电子设备在第三时间段内,利用第三通信技术广播第三报文,该第三报文用于查询其它设备具有的通信技术能力;其中,该第三通信技术和该第一通信技术存在冲突,该第一时间段和该第三时间段在时域上没有重叠,该第二时间段和该第三时间段有重叠。在该实现方式中,第一电子设备在利用相互冲突((例如存在信道、空口时序上等的冲突)的通信技术同时分别广播报文时,利用相互冲突的通信技术分别广播报文的时间段在时域上是没有重叠的,而多种不冲突的通信技术分别广播报文的时间段在时域上是有重叠的(部分重叠或者全部重叠),从而实现了利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送(同时广播)报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。
示例性的,本申请实施例中,“同时发送”可以理解为:利用第一通信技术在第一时间段上广播第一报文,利用第二通信技术在第二时间段上广播第一报文,如果第一通信技术和第二通信技术不冲突(例如不存在信道、空口时序上等的冲突),则第一时间段和第二时间段是时域上可以存在重叠(可以是部分重叠或者全部重叠)。在此基础上,利用第三通信技术在第三时间段上广播第三报文,如果第三通信技术与第一通信技术或者第二通信技术存在冲突(例如存在信道、空口时序上等的冲突),则第三时间段和第一时间段在时域上是没有重叠的,或者,第三时间段和第二时间段在时域上是没有重叠的。即“同时发送”可以理解为:利用多种不冲突的通信技术分别发送报文的时间段在时域上是有重叠的(部分重叠或者全部重叠),而利用相互冲突的通信技术分别发送报文的时间段在时域上是没有重叠的。
第二方面,提供了一种发现和连接电子设备的方法,该方法包括:第一电子设备在第一时间窗内,利用第一通信技术广播第一报文,该第一报文用于查询其它设备具有的通信技术能力;该第一电子设备在该第一时间窗内,利用第二通信技术广播第二报文,该第二报文用于查询其它设备具有的通信技术能力;该第一电子设备接收第二电子设备发送的响应信息;该第一电子设备根据响应信息(一个或者多个响应信息),确定该第二电子设备支持的通信技术能力;该第一电子设备根据第二电子设备支持的通信技术能力,与该第二电子设备之间建立通信连接。
第二方面提供的发现和连接电子设备的方法,第一电子设备利用多种通信技术,在同一个时间窗的时间粒度内,利用多种不同的通信技术同时发送报文。实现了利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送(同时广播)报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,可以主动地发现更多的支持分布能力的设备,实现了支持多种发现连接技术的融合,提高发现和连接电子设备的效率,提高 用户体验。
示例性的,第一时间窗内可以理解:在无线通信协议中定义的利用多种不同的通信技术(例如:BT、Wi-Fi、NFC、Zigbee、USB、Cellular等)共同发送一组报文的最短的一个时间单元,该时间单元是利用BT、Wi-Fi、NFC、Zigbee、USB、Cellular等发送报文时共同遵守的。即在第一时间窗内,第一电子设备利用具有的所有发现设备的技术或者所有发现设备的技术中的多种发送(广播)报文。第一时间窗为长度最小的一个时间单元,换句话说,可以将第一时间窗理解为第一电子设备利用具有的所有发现设备的技术或者所有发现设备的技术中的多种发送报文需要的最短时间。第一时间窗为最小的时间粒度,在时间上不具有可分割性。在本申请实施例中,第一时间窗的长度可以为微秒级、毫秒级或者秒级。
示例性的,第一时间窗由多个时隙或者多个符号组成。
在第二方面一种可能的实现方式中,该方法还包括:该方法还包括:该第一电子设备在该第一时间窗内,利用第三通信技术广播第三报文,该第三报文用于查询其它设备具有的通信技术能力;其中,该第三通信技术和该第一通信技术存在冲突。在该实现方式中,第一电子设备在该时间窗内,同时利用不冲突的多种通信技术分别广播报文(即利用多种不冲突的通信技术分别广播报文的时间段在时域上是有重叠的,可以是部分重叠或者全部重叠,在该时间窗内,第一电子设备同时利用另外一种通信技术广播报文,如果另外一种通信技术和该时间窗内用来广播报文的某一个通信技术有冲突,则利用相互冲突的多种通信技术,在该时间窗内分时发送广播报文。满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。
示例性的,本申请实施例中,“同时发送”可以理解为:在一个时间窗的时间长度内,电子设备在该时间窗内,同时利用不冲突的多种通信技术分别广播报文(即利用多种不冲突的通信技术分别广播报文的时间段在时域上是有重叠的,可以是部分重叠或者全部重叠,例如:多种不冲突的通信技术可以分别同时开始广播报文)。在此基础上,在该时间窗内,同时利用另外一种通信技术广播报文,如果另外一种通信技术和该时间窗内用来广播报文的某一个通信技术有冲突,则利用相互冲突的多种通信技术,在该时间窗内分时发送服务查询请求。换句话说,本申请实例中的“同时发送”可以理解为:电子设备在一个时间窗的时间粒度内,需要利用多种不同的通信技术同时广播报文。
示例性的,第一电子设备的多种不同的通信技术能力包括:BT、Wi-Fi、NFC、Zigbee、USB、Cellular等能力中的多种。
示例性的,第一电子设备和第二电子设备包括但不限于智能电视、大屏设备、手机、平板电脑、笔记本、大屏电视、智能家居单品、PDA、车载电脑等。
在第一方面或者第二方面一种可能的实现方式中,该第一报文指示该第一电子设备具有的通信技术能力或者指示该第一电子设备广播报文所使用的通信技术。在该实现方式中,可以使得第二电子设备获知第一电子设备具有的通信技术能力,从而便于第二电子设备根据第一电子设备具有的通信技术能力与第一电子设备建立通信连接,提高了建立通信连接的效率。
示例性的,第一电子设备具有的通信技术能力包括:BT、Wi-Fi、NFC、Zigbee、USB、Cellular等能力中的多种。
在第一方面或者第二方面一种可能的实现方式中,该第一报文和该第二报文均包括该第一电子设备的第一随机码。其中,该第一随机码由第一电子设备随机生成。第一电子设备可以在不同的时间生成不同的第一随机码,该第一随机码用于唯一标识第一电子设备。在该实现方式中,利用不同的报文中携带的相同的随机码来标识第一报文和第二报文均来自于第一电子设备,容易实现,节省通信资源,准确性高。
在第一方面或者第二方面一种可能的实现方式中,该响应信息包括:该第二电子设备的第二随机码、以及用于指示该第二电子设备具有的通信技术能力的指示信息。其中,该随机码由第二电子设备随机生成。第二电子设备可以在不同的时间生成不同的随机码,该随机码用于唯一标识第二电子设备。在该实现方式中,可以使得第一电子设备获知第二电子设备具有的通信技术能力,从而便于第一电子设备根据第二电子设备具有的通信技术能力与第二电子设备建立通信连接,提高了建立通信连接的效率。并且,利用不同的报文中携带的相同的随机码来标识第一报文和第二报文均来自于第一电子设备,容易实现,节省通信资源,准确性高。
在第一方面或者第二方面一种可能的实现方式中,在该第一电子设备根据第二电子设备支持的通信技术能力,与该第二电子设备之间建立通信连接之前,该方法还包括:该第一电子设备根据第二随机码,确定该响应信息来自于该第二电子设备;该第一电子设备根据响应信息,获取该第二电子设备的网络标识信息,该第二电子设备的网络标识信息包括:该第二电子设备的MAC地址或者IP地址。在该实现方式中,利用第二电子设备的网络标识信息标识第二电子设备,第二电子设备的网络标识信息是可以变化的,可以根据第二电子设备支持的能力的变化进行动态拓展与更新,因此第二电子设备的网络标识信息是可以动态拓展的,利用第二电子设备的网络标识信息来标识设备,可以有效的防止设备ID信息被追踪,解决了现有技术中利用设备的唯一ID来标识设备时容易被跟踪的问题,提高设备的安全性。
示例性的,该第二电子设备网络标识信息包括:BT MAC、Wi-Fi MAC、USB MAC、IP,即第二电子设备的网络标识信息包括第二电子设备的四个参数,这四个参数分别是:第二电子设备的BT MAC地址,第二电子设备的Wi-Fi MAC地址,第二电子设备的USB MAC地址,第二电子设备的IP地址。
示例性的,第一电子设备接收的第二电子设备发送的响应信息可以为一个或者多个,不同的响应信息是第二电子设备利用不同的通信技术广播或者发送的。
在第一方面或者第二方面一种可能的实现方式中,在该第一电子设备接收该第二电子设备发送的响应信息之后,该方法还包括:该第一电子设备接收该第二电子设备发送的第一信息,该第一信息包括该第二电子设备的网络标识;该第一电子设备根据第二电子设备的网络标识信息,以及该第一信息携带的该第二电子设备的网络标识,确定该第一信息来自于该第二电子设备。在该实现方式中,第一电子设备根据第一信息包括该第二电子设备的网络标识,结合之前存储的第二电子设备的网络标识信息,将两者进行对比,便可以确定第一信息是第二电子设备发送的,即进行设备的去重处理。进一步的,可以将第二电子设备发送的多个信息包括的内容进行过滤和共享,这 样可以避免第一电子设备和第二电子设备之间多次进行交互,从而节省信令的开销,提高资源的利用率。
在第一方面或者第二方面一种可能的实现方式中,该第一电子设备根据第二电子设备支持的通信技术能力,与该第二电子设备之间建立通信连接,包括:该第一电子设备根据第二电子设备支持的通信技术能力,确定该第一电子设备和该第二电子设备均支持的通信技术能力集合;该第一电子设备在该通信技术能力集合中,根据待传输业务,向该第二电子设备发送连接请求,该连接请求包括一种或者多种通信技术分别对应连接信息;该第一电子设备利用该一种或者多种通信技术与该第二电子设备建立通信连接。在该实现方式中,第一电子设备可以利用一种或者多种通信技术与该第二电子设备建立通信连接,提高通信连接效率,并且,可以满足不同业务传输的要求。
示例性的,该连接请求包括:最优的一种或者多种连接方式(例如Wi-Fi、蓝牙等)对应的协议里定义的标准请求信息,例如,可以包括连接地址、连接窗口、安全要求等信息。
示例性的,第一电子设备可以预定义连接策略,针对大带宽的业务,在近场传输时,按照优先级从高到低的顺序将不同能力进行排序。远场传输时,按照优先级从高到低的顺序将不同能力(即技术)进行排序,在第一电子设备和第二电子设备进行连接时,第一电子设备可以按上述的不同能力的优先级,在第一电子设备和第二电子设备均支持的能力中,选择优先级最高的方式与大屏设备进行连接。或者,选择优先较高的前几种方式均与第二电子设备进行连接。
在第一方面或者第二方面一种可能的实现方式中,随着第一电子设备和第二电子设备之间进行的多次业务传输的连接,第一电子设备可以监听多次连接的过程中每次连接过程中的通信时延、每次连接过程的带宽的信息等,动态的调整后续与第二电子设备之间建立连接的方式,以及动态的调整各个不同能力优先级顺序。进一步的提高通信连接的效率。
在第一方面或者第二方面一种可能的实现方式中,该第一电子设备通过已经建立通信连接的一种或者多种通信技术,向该第二电子设备发送待传输业务的数据。在该实现方式中,在第一电子设备和第二电子设备之间同时存在多种连接的情况下,第一电子设备可以选择其中最优的一种,或者同时选择其中的多种同时向第二电子设备传输数据,提高了第一电子设备和第二电子设备之间数据传输的效率,进一步的提高用户体验。
第三方面,提供了一种发现和连接电子设备的方法,该方法包括:第二电子设备在第一时间段内,接收第一电子设备利用第一通信技术广播的第一报文,该第一报文用于查询其它设备具有的通信技术能力;该第二电子设备在第二时间段内,接收该第一电子设备利用第二通信技术广播的第二报文,该第二报文用于查询其它设备具有的通信技术能力,该第一时间段和该第二时间段有重叠;该第二电子设备根据第一报文和该第二报文,向该第一电子设备发送响应信息;该第二电子接收该第一电子设备发送的连接请求;该第二电子设备根据连接请求,与该第一电子设备之间建立通信连接。
第三方面提供的发现和连接电子设备的方法,第一电子设备利用多种通信技术在重叠的时间段上分别广播报文,即利用多种不同的通信技术分别广播报文的时间段在 时域上是有重叠的(部分重叠或者全部重叠)。即利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送(同时广播)报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,可以主动地发现更多的支持分布能力的设备,实现了支持多种发现连接技术的融合,提高发现和连接电子设备的效率,提高用户体验。
在第三方面一种可能的实现方式中,该方法还包括:该第二电子设备在第三时间段内,接收该第一电子设备利用第三通信技术广播的第三报文,该第三报文用于查询其它设备具有的通信技术能力;其中,该第三通信技术和该第一通信技术存在冲突,该第一时间段和该第三时间段在时域上没有重叠,该第二时间段和该第三时间段有重叠。在该实现方式中,第一电子设备在利用相互冲突((例如存在信道、空口时序上等的冲突)的通信技术同时分别广播报文时,利用相互冲突的通信技术分别发送服务查询请求的时间段在时域上是没有重叠的,而多种不冲突的通信技术分别广播报文的时间段在时域上是有重叠的(部分重叠或者全部重叠),从而实现了利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送(同时广播)报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。
第四方面,提供了一种发现和连接电子设备的方法,该方法包括:第二电子设备在第一时间窗内,接收第一电子设备利用第一通信技术广播的第一报文,该第一报文用于查询其它设备具有的通信技术能力;该第二电子设备在该第一时间窗内,接收该第一电子设备利用第二通信技术广播的第二报文;该第二电子设备根据第一报文和该第二报文,向该第一电子设备发送响应信息;该第二电子接收该第一电子设备发送的连接请求;该第二电子设备根据连接请求,与该第一电子设备之间建立通信连接。
第四方面提供的发现和连接电子设备的方法,第一电子设备利用多种通信技术,在同一个时间窗的时间粒度内,利用多种不同的通信技术同时发送报文。实现了利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送(同时广播)报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,可以主动地发现更多的支持分布能力的设备,实现了支持多种发现连接技术的融合,提高发现和连接电子设备的效率,提高用户体验。
在第四方面一种可能的实现方式中,该方法还包括:该第二电子设备在该第一时间窗内,接收该第一电子设备利用第三通信技术广播的第三报文,该第三报文用于查询其它设备具有的通信技术能力;其中,该第三通信技术和该第一通信技术存在冲突。在该实现方式中,第一电子设备在该时间窗内,同时利用不冲突的多种通信技术分别广播报文(即利用多种不冲突的通信技术分别广播报文的时间段在时域上是有重叠的,可以是部分重叠或者全部重叠,在该时间窗内,第一电子设备同时利用另外一种通信技术广播报文,如果另外一种通信技术和该时间窗内用来广播报文的某一个通信技术有冲突,则利用相互冲突的多种通信技术,在该时间窗内分时发送广播报文。满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。
示例性的,第一电子设备或者第二电子设备的多种不同的通信技术能力包括:BT、Wi-Fi、NFC、Zigbee、USB、Cellular等能力中的多种。
示例性的,第一电子设备和第二电子设备包括但不限于智能电视、大屏设备、手机、平板电脑、笔记本、大屏电视、智能家居单品、PDA、车载电脑等。
在第三方面或者第四方面一种可能的实现方式中,该第一报文指示该第一电子设备具有的通信技术能力或者指示该第一电子设备广播报文所使用的通信技术。在该实现方式中,可以使得第二电子设备获知第一电子设备具有的通信技术能力,从而便于第二电子设备根据第一电子设备具有的通信技术能力与第一电子设备建立通信连接,提高了建立通信连接的效率。
在第三方面或者第四方面一种可能的实现方式中,该第一报文和该第二报文均包括该第一电子设备的第一随机码。其中,该随机码由第一电子设备随机生成。第一电子设备可以在不同的时间生成不同的随机码,该随机码用于唯一标识第一电子设备。在该实现方式中,利用不同的报文中携带的相同的随机码来标识第一报文和第二报文均来自于第一电子设备,容易实现,节省通信资源,准确性高。
在第三方面或者第四方面一种可能的实现方式中,在该第二电子设备根据连接请求,与该第一电子设备之间建立通信连接之前,该方法还包括:该第二电子设备根据第一随机码,确定该第一报文和该第二报文均来自于该第一电子设备;该第二电子设备根据第一报文和该第二报文,获取该第一电子设备的网络标识信息,该第一电子设备的网络标识信息包括:该第一电子设备的MAC地址或者IP地址。在该实现方式中,利用第一电子设备的网络标识信息标识第一电子设备,第一电子设备的网络标识信息是可以变化的,可以根据第一电子设备支持的能力的变化进行动态拓展与更新,因此第一电子设备的网络标识信息是可以动态拓展的,利用第一电子设备的网络标识信息来标识设备,可以有效的防止设备ID信息被追踪,解决了现有技术中利用设备的唯一ID来标识设备时容易被跟踪的问题,提高设备的安全性。
示例性的,该第一电子设备网络标识信息包括:BT MAC、Wi-Fi MAC、NFC MAC、USB MAC、IP,即第一电子设备的网络标识信息包括第一电子设备的五个参数,这五个参数分别是:第一电子设备的BT MAC地址,第一电子设备的Wi-Fi MAC地址,第一电子设备的NFC MAC地址,第一电子设备的USB MAC地址,第一电子设备的IP地址。
在第三方面或者第四方面一种可能的实现方式中,在该第二电子设备接收该第一报文和该第二报文之后,该方法还包括:该第二电子设备接收该第一电子设备发送的第二信息,该第二信息包括该第一电子设备的网络标识;该第二电子设备根据第一电子设备的网络标识信息,以及该第二信息携带的该第一电子设备的网络标识,确定该第二信息来自于该第一电子设备。在该实现方式中,第二电子设备根据第二信息包括该第一电子设备的网络标识,结合之前存储的第一电子设备的网络标识信息,将两者进行对比,便可以确定第二信息是第一电子设备发送的,即进行设备的去重处理。进一步的,可以将第一电子设备发送的多个信息包括的内容进行过滤和共享,这样可以避免第一电子设备和第二电子设备之间多次进行交互,从而节省信令的开销,提高资源的利用率。
在第三方面或者第四方面一种可能的实现方式中,该第二电子设备根据第一报文和该第二报文,向该第一电子设备发送响应信息,包括:该第二电子设备在第四时间段内,利用第四通信技术向该第一电子设备发送第一响应信息;该第二电子设备在第五时间段内,利用第五通信技术向该第一电子设备发送第二响应信息,该第四时间段和该第五时间段有重叠。在该实现方式中,第二电子设备利用多种通信技术在重叠的时间段上分别广播报文,即利用多种不同的通信技术分别向第一电子设备发送响应信息(广播报文)。发送多个响应信息的时间段在时域上是有重叠的(部分重叠或者全部重叠)。即利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,实现了支持多种发现连接技术的融合,提高发现和连接电子设备的效率,提高用户体验。
在第三方面或者第四方面一种可能的实现方式中,该方法还包括:该第二电子设备在第六时间段内,利用第六通信技术向该第一电子设备发送第三响应信息;其中,该第六通信技术和该第四通信技术存在冲突,该第四时间段和该第六时间段在时域上没有重叠,该第五时间段和该第六时间段有重叠。在该实现方式中,第二电子设备在利用相互冲突((例如存在信道、空口时序上等的冲突)的通信技术同时分别发送响应信息(广播报文)时,利用相互冲突的通信技术分别发送报文的时间段在时域上是没有重叠的,而多种不冲突的通信技术分别发送报文的时间段在时域上是有重叠的(部分重叠或者全部重叠),从而实现了利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。
在第三方面或者第四方面一种可能的实现方式中,该第二电子设备根据第一报文和该第二报文,向该第一电子设备发送响应信息,包括:该第二电子设备在第二时间窗内,利用第四通信技术向该第一电子设备发送第一响应信息;该第一电子设备在该第二时间窗内,利用第五通信技术向该第一电子设备发送第二响应信息。在该实现方式中,第二电子设备利用多种通信技术,在同一个时间窗的时间粒度内,利用这多种不同的通信技术同时发送报文。实现了利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时发送报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求。实现了支持多种发现连接技术的融合,提高发现和连接电子设备的效率,提高用户体验。
在第三方面或者第四方面一种可能的实现方式中,该响应信息包括:该第二电子设备的第二随机码、以及用于指示该第二电子设备具有的通信技术能力的指示信息。在该实现方式中,其中,该第二随机码由第二电子设备随机生成。第二电子设备可以在不同的时间生成不同的第二随机码,该第二随机码用于唯一标识第二电子设备。利用不同的响应信息携带的相同的随机码来标识第一响应信息和第二响应信息均来自于第二电子设备,容易实现,节省通信资源,准确性高。并且,可以使得第一电子设备获知第二电子设备具有的通信技术能力,从而便于第一电子设备根据第二电子设备具有的通信技术能力与第二电子设备建立通信连接,提高了建立通信连接的效率。
在第三方面或者第四方面一种可能的实现方式中,该连接请求包括:一种或者多种通信技术分别对应连接信息。在该实现方式中,第一电子设备可以利用一种或者多种通信技术与该第二电子设备建立通信连接,提高通信连接效率,并且,可以满足不同业务传输的要求。
示例性的,该连接请求包括:最优的一种或者多种连接方式(例如Wi-Fi、蓝牙等)对应的协议里定义的标准请求信息,例如,可以包括连接地址、连接窗口、安全要求等信息。
在第三方面或者第四方面一种可能的实现方式中,该方法还包括:该第二电子设备通过已经建立通信连接的一种或者多种通信技术,接收该第一电子设备发送待传输业务的数据。在该实现方式中,在第一电子设备和第二电子设备之间同时存在多种连接的情况下,第一电子设备可以选择其中最优的一种,或者同时选择其中的多种同时向第二电子设备传输数据,提高了第一电子设备和第二电子设备之间数据传输的效率,进一步的提高用户体验。
第五方面,提供了一种电子设备,该电子设备包括:用于执行以上第一方面或者第一方面的任意一方面可能的实现方式中的各个步骤的单元,或者用于执行以上第二方面或者第二方面的任意一方面可能的实现方式中的各个步骤的单元。
第六方面,提供了一种电子设备,该电子设备包括:用于执行以上第三方面或者第三方面的任意一方面可能的实现方式中的各个步骤的单元,或者用于执行以上第四方面或者第四方面的任意一方面可能的实现方式中的各个步骤的单元。
第七方面,提供了一种电子设备,该电子设备包括至少一个处理器和存储器,至少一个处理器用于执行:以上第一方面或者第一方面的任意一方面可能的实现方式中的方法,或者,以上第二方面或者第二方面的任意一方面可能的实现方式中的方法。
第八方面,提供了一种电子设备,该电子设备包括至少一个处理器和存储器,至少一个处理器用于执行:以上第三方面或者第三方面的任意一方面可能的实现方式中的方法,或者,以上第四方面或者第四方面的任意一方面可能的实现方式中的方法。
第九方面,提供了一种电子设备,该电子设备包括至少一个处理器和接口电路,至少一个处理器用于执行:以上第一方面或者第一方面的任意一方面可能的实现方式中的方法,或者,以上第二方面或者第二方面的任意一方面可能的实现方式中的方法。
第十方面,提供了一种电子设备,该电子设备包括至少一个处理器和接口电路,至少一个处理器用于执行:以上第三方面或者第三方面的任意三方面可能的实现方式中的方法,或者,以上第四方面或者第四方面的任意一方面可能的实现方式中的方法。
第十一方面,提供了一种通信装置,该通信装置包括上述第五方面、第七方面或者第九方面提供的任一种电子设备。
第十二方面,提供了一种通信装置,该通信装置包括上述第六方面、第八方面或者第十方面提供的任一种电子设备。
第十三方面,提供了一种的通信系统,该通信系统包括:上述第五方面、第七方面、第九方面、或第十一方面提供的任一种电子设备,以及,上述第六方面、第八方面、第十方面、或第十二方面提供的任一种电子设备。
第十四方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序, 该计算机程序在被处理器执行时,用于执行第一方面至第四方面中任意一方面中的方法,或者,用于执行第一方面至第四方面中任意一方面中的任意可能的实现方式中的方法。
第十五方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序被执行时,用于执行第一方面至第四方面中任意一方面中的方法,或者,用于执行第一方面至第四方面中任意一方面中的任意可能的实现方式中的方法。
第十六方面,提供了一种芯片,该芯片包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有该芯片的通信设备执行第一方面至第四方面中任意一方面中的方法,或者,用于执行第一方面至第四方面中任意一方面中的任意可能的实现方式中的方法。
本申请提供的发现和连接电子设备的方法以及电子设备,利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时广播或者同时发送报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,可以使得多种发现连接技术并行进行使用,提高设备发现的效率。提高用户体验。并且,采用设备的网络标识信息来标识一个设备,可以避免当前业界通常采取的唯一设备ID标识设备时容易被追踪的问题,可以有效的防止设备ID信息被追踪,提高设备的安全性,同时满足当设备能力是动态变化时,网络标识信息随之动态的变化。进一步的,采用设备的网络标识进行设备去重,从而过滤掉重复的信息,并且,在进行设备连接时,可以获取对端设备的支持的能力,从而可以根据业务、按场景选择最优化的连接技术与连接能力进行连接,提高用户的体验。
附图说明
图1是本申请提供的一例适用于本申请实施例的应用场景的示意图。
图2是本申请提供的另一例适用于本申请实施例的应用场景的示意图。
图3是本申请提供的一例电子设备的系统架构的示意图。
图4是本申请提供的一例发现端设备通过主动发现方式发现周边设备过程的示意图。
图5是本申请提供的一例发现端设备通过被动发现方式发现周边设备过程的示意图。
图6是本申请实施例提供的一例发现和连接电子设备的方法的示意性流程图。
图7是本申请实施例提供的一例用户触发智能手机主动发现周边设备的示意性用户界面图。
图8是本申请实施例提供的另一例用户触发智能手机主动发现周边设备的示意性用户界面图。
图9是本申请实施例提供的一例BLE、Wi-Fi(2.4GHz)在不同的时隙上广播服务查询请求的示意图。
图10是本申请实施例提供的另一例发现和连接电子设备的方法的示意性流程图。
图11是本申请实施例提供的一例电子设备结构的示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
本申请实施例中的电子设备可以指用户设备、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。终端设备还可以是蜂窝电话、无绳电话、会话启动协议(Session Initiation Protocol,SIP)电话、无线本地环路(Wireless Local Loop,WLL)站、个人数字处理(Personal Digital Assistant,PDA)、具有无线或者有线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,例如,该终端设备可以为智能电视、大屏设备、智慧屏、智能手机、智能音箱、笔记本电脑、平板电脑、车载远程信息处理器(T-BOX)、车机设备等。本申请实施例对此并不限定。
另外,本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本申请中使用的术语“制品”涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括,但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。另外,本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可包括但不限于,无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
在无线通信网络中涉及多种无线技术和有线技术方案,比如蓝牙(bluetooth,BT)技术、Wi-Fi技术、NFC技术、紫蜂(Zigbee)技术、USB技术、蜂窝通信(Cellular)技术等。目前对于不同种类的终端设备而言,均可以具有多种无线技术或者有线技术通信的能力。由于设备能力(例如内存大小、功耗大小等)差异、以及不同的无线技术的能力差异(例如传输远近、带宽高低等),在不同的设备(例如:大屏设备、车机、音箱、手表、智能开关等)上常常会采用不同的技术和其他设备之间进行连接以及通信。
例如,对于一个电子设备而言,可以使用带外数据(out of band,OOB)方式和其他设备之间进行通信。OOB是一种标准处理方式,其本质是首先第一种发现连接技术去发现设备,在发现设备的过程中交换第二种连接技术的连接信息,最后通过第二连接技术进行设备间的连接以及数据的传输。例如,一个设备通过NFC碰触方式发现另一个设备,在利用NFC发现另一个设备的过程中,这两个设备相互交换蓝牙的连接信息,最后利用蓝牙的方式建立两个设备之间的连接以及数据的传输。这样可以有效缩短蓝牙技术的发现时延,并采用通过NFC碰触方式代替蓝牙扫描方式来发现设备,提高用户操作便利性。
但是,采用OOB的方式在发现设备时,实际只是采用一种技术手段进行发现设备。换句话说,在某一个设备在发现另一个设备时,即使该设备具有多种无线技术的能力,也只能利用该设备其中的一种无线技术去发现另一个设备,无法满足在异构网络架构中,业务服务对具有多种无线技术能力设备的需求,用户体验较差。
当某一个设备具备多种无线技术和有线技术的能力时,还有另外一种方式进行两个设备之间的发现以及连接,即会根据设备具有的多种无线技术和有线技术的优先级,首先利用高优先级的无线或者有线技术扫描一段时间,扫描时间结束后,然后再启动低优先级的技术再扫描一段时间,在扫描到其他设备后,再进行连接设备的操作。该方式实际上还是采用一种技术手段进行发现设备,无法满足在异构网络架构中,业务服务对具有多种无线技术能力设备的需求,用户体验较差。
有鉴于此,本申请提供了一种发现和连接电子设备的方法,利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时去发现另一个设备,并且根据不同的业务需求以及网络环境等选择其中最优的一种或者多种技术进行设备连接以及数据的传输,实现了支持多种发现连接技术的融合,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。
图1为本申请提供的一例适用于本申请实施例的应用场景的示意图。图1所示的为家庭场景的示意图,如图1所示场景包括第一电子设备和第二电子设备,在图1中,第一电子设备以用户使用智能手机110为例,第二电子设备以家庭中的大屏设备120为例。其中,智能手机110可以支持多种发现设备的技术或者能力,例如,智能手机110可以支持:BT、Wi-Fi、NFC、Zigbee、USB、Cellular等能力中的多种。大屏设备120支持:BT、Wi-Fi、NFC、USB、Cellular等能力中的多种。在用户利用智能手机110发现并连接大屏设备120,可以使用本申请提供的发现和连接电子设备的方法,智能手机110可以利用BT技术、Wi-Fi、NFC、Zigbee、USB、Cellular等这些技术同时去发现大屏设备120,并且根据业务或者网络环境等选择其中最优的一种技术进行 设备连接以及数据的传输。
应理解,图1仅仅为示例性的,不应该对适用于本申请实施例的应用场景产生任何限制。例如,在图1所示的应用场景中还可以包括其他的家居设备,例如为个人电脑、PAD等。在用户利用智能手机110发现并连接这些设备时,也可以使用本申请提供的发现和连接电子设备的方法。
图2为本申请提供的另一例适用于本申请实施例的应用场景的示意图。图2所示的为车联网场景的示意图,如图2所示场景包括第一电子设备和第二电子设备,在图2中,第一电子设备以用户使用智能手机210为例,第二电子设备以车载设备220为例。车载设备220可以包括车上的电子控制单元(electronic control unit,ECU)、行车电脑、车载电脑或者车载T-BOX等,本申请实施例在此不做限制。智能手机210可以支持多种发现设备的技术或者能力,例如,智能手机210可以支持:BT、Wi-Fi、NFC、Zigbee、USB、Cellular等能力中的多种。车载设备220支持:BT、Wi-Fi、NFC、USB、Cellular等能力中的多种。在用户利用智能手机210发现并连接车载设备220时,可以使用本申请提供的发现和连接电子设备的方法,智能手机210可以利用BT技术、Wi-Fi、NFC、Zigbee、USB、Cellular等这些技术同时去发现车载设备220,并且根据业务或者网络环境等选择其中最优的一种技术进行设备连接以及数据的传输。
应理解,图2仅仅为示例性的,不应该对适用于本申请实施例的应用场景产生任何限制。例如,在图2所示的应用场景中还可以包括其他的车载设备和用户设备等。本申请实施例在此不作限制。
还应理解,在本申请实施例中,BT可以包括经典蓝牙以及低功耗蓝牙(bluetooth low energy,BLE)蓝牙。其中,经典蓝牙包括:蓝牙基础速率(bluetooth basic rate,BR)和蓝牙增强速率(bluetooth enhanced data rate,EDR)两种类型的蓝牙中的至少一种。
还应理解,图1和图2仅仅为示例性的说明本申请实施例的应用场景,本申请提供的发现和连接电子设备的方法还可以应用于其他场景中,本申请实施例在此不作限制。
图3所示为本申请提供的电子设备的系统架构的示意图。如图3所示的,该系统架构主要包括:发现模块和连接模块。其中,发现模块可以包括:发现设备模块和/或被发现设备模块、发现连接能力的插件管理模块(Discover Ability Plugin Mgmt)、发现连接策略管理模块(Discover Strategy)、网络服务发现管理模块(NsdDiscover Mgmt)、USB发现管理模块(USb Discover Mgmt)、BT发现管理模块(BTDiscover Mgmt)、Wi-Fi发现管理模块(Wi-Fi Discover Mgmt)、以及其它发现方式管理模块等。连接模块包括:连接管理模块(Connect Manager)、连接状态机模块(Link State Machine)、USB链路模块(USB Channel)、BT链路模块(BT Channel)、Wi-Fi链路模块(Wi-Fi Channel)以及其它链路模块等。
应该理解,在本申请实施例中,电子设备的系统架构可以包括图3所示的发现设备模块和被发现设备模块这两个模块,也可以包括发现设备模块和被发现设备模块中的任意一个。如果电子设备包括发现设备模块和被发现设备模块这两个模块,则该电子设备可以具有主动发现功能和被动发现功能,即该电子设备可以为发现端设备,也 可以为被发现端设备。如果电子设备包括发现设备模块,不包括被发现设备模块,则该电子设备具有主动发现功能,不具有被动发现功能,即该电子设备为发现端设备。如果电子设备包括被发现设备,不包括发现设备模块,则该电子设备可以具有被动发现功能,不具有主动发现功能,即该电子设备为被发现端设备。
其中,发现设备模块(Discover Device)包括两种发现模式:分别为主动发现模式(active mode)和被动发现模式(passive mode)。被发现设备模块(Discoverable Device)也包括两种发现模式:分别为主动发现模式(active mode)和被动发现模式(passive mode)。
其中,发现设备模块主要负责管理发现端设备的能力,发现设备模块负责通过发现连接能力的插件管理模块管理发现端设备上各种不同能力(例如BT、Wi-Fi、NFC、Zigbee、USB、Cellular等能力);并通过发现连接策略管理模块,调度底层的BT、Wi-Fi、NFC、Zigbee、USB、Cellular或者其它发现能力。
被发现设备模块的功能与发现设备模块的功能类似,其主要负责被发现端设备的能力。
发现连接能力的插件管理模块负责设备上各种能力(例如BT、Wi-Fi、NFC、Zigbee、USB、Cellular等能力)的注册及管理。
发现连接策略管理模块负责设备上各种能力(即各种连接技术)之间的协调和调度。
连接管理模块及连接状态机模块负责各种能力(即各种连接技术)连接的协商与建议。
各种连接技术的发现管理模块以及链路模块负责具体的连接技术(例如BT、Wi-Fi、NFC、Zigbee、USB、Cellular等)发现以及连接行为的实施。
应理解,图3仅仅是示例性的,不应该对本申请中电子设备的系统架构产生任何的限制。例如,在本申请另一些实施例中,电子设备的系统架构也可以采用与图3所示的例子中不同的模块、更多或者更少的模块、或者多种不同模块方式的组合等。本申请实施例在此不作限制。
下面介绍本申请实施例中的发现端设备和被发现端设备。
发现端设备可以通过向周边的其他设备广播报文、或者监听其他设备广播的报文,从而发现周围具有一个或者多个服务或者能力的设备,并提示用户选择设备或者服务进行连接,并且,发现端设备会主动发起连接请求。
换句话说,发现端设备可以通过主动广播或者被动监听的方式获取周边设备支持的服务或者能力,并且是与其他设备之间的连接动作的发起方。
在本申请实施例中,周边设备的能力可以理解为周边设备具有的各种无线以及有线连接技术,包括:BT、Wi-Fi、NFC、Zigbee、USB、Cellular等技术或者能力。周边设备的服务可以理解为基于该设备支持的能力上的各种服务或者业务,例如包括文件分享、打印、投屏等服务。
被发现端设备:可以通过回复发现端设备广播的报文或者反馈监听的手段对周边设备通告自身具有的能力以及服务,使得自身设备的能力以及服务可以被周边设备感知。反馈监听(或者也可以称为被动监听反馈方式)可以理解为:发现端设备(即监 听方设备)订阅(或者监听)被发现端设备(即被监听方设备)发布的信息,被发现端设备主动广播报文以使得发现端设备进行监听的方式。被发现端设备会接收发现端设备的连接请求,然后进行绑定认证或者认证过程。
换句话说,被发现端设备会通过主动广播或者被动监听反馈方式向周边设备通知自身设备服务或者能力,并且,发现端设备是与其他设备之间的连接动作的接收方。
下面介绍本申请实施例中的主动发现方式和被动发现方式。
主动发现方式:主动发现是发现端设备主动向周边设备通过广播的方式广播服务查询请求,然后等待被发现端设备回复其具有的服务信息或者能力信息,当收到被发现端设备回复的服务信息或者能力信息之后,提供给上层调用者调用。
发现端设备主动广播的服务查询请求可以携带发现端设备期望被发现端设备满足的条件,例如:设备名称、设备类型、设备能力(例如是否包含音频、视频等能力)、服务信息(例如是否支持投屏服务、打印服务等)等等。该服务查询请求携带的服务信息主要目的是用于被发现设备匹配期望的服务能力,例如,该服务信息可以包括:服务名、服务ID、服务属性等等。
可选的,该服务查询请求还可以携带发现端设备自身的能力信息(例如包括:设备名称、设备类型、设备能力或者服务能力等),其目的是优化发现的流程,减少之后发现过程交互流程。
例如,图4所示的本申请提供的一例发现端设备通过主动发现方式发现周边设备过程示意图。在图4所示的例子中,发现端设备为设备A,被发现设备包括设备B、设备C、设备D以及设备X。
如图4所示的,设备A同时向设备B、设备C、设备D以及设备X广播服务查询请求。该服务查询请求包括:目标设备需要支持的能力信息和/或服务信息等。例如,目标设备需要支持的能力可以包括:BT、Wi-Fi、NFC、Zigbee、USB、Cellular等能力中的一种或者多种。目标设备需要支持的服务可以包括:文件分享、投屏、打印等服务中的一种或者多种。可选的,该服务查询请求还可以包括设备A的自身的能力信息等。
在设备B、设备C、设备D以及设备X分别接收到广播的服务查询请求后,设备B根据服务查询请求,确定自身是否满足设备A的广播需求,例如,确定设备B是否支持该服务查询请求中要求支持的能力以及服务等。如果设备B支持,则设备B向设备A回复消息,该消息包括设备B支持的能力以及服务等。
类似的,设备C根据服务查询请求,确定自身是否满足设备A的广播需求,例如,确定设备C是否支持该服务查询请求中要求支持的能力以及服务等。如果设备C不支持,则设备C不会向设备A回复消息。
设备D根据服务查询请求,确定自身是否满足设备A的广播需求,例如,确定设备D是否支持该服务查询请求中要求支持的能力以及服务等。如果设备D支持,则设备D向设备A回复消息,该消息包括设备D支持的能力以及服务等。
设备X根据服务查询请求,确定自身是否满足设备A的广播需求,例如,确定设备X是否支持该服务查询请求中要求支持的能力以及服务等。如果设备X不支持,则设备X不会向设备A回复消息。
被动发现方式:被动发现是发现端设备被动订阅周边设备发布的服务或者能力信息之后,发现端设备监听被发现设备主动广播的能力信息或者服务信息。
例如,图5所示的本申请提供的一例发现端设备通过被动发现方式发现周边设备过程示意图。在图5所示的例子中,发现端设备为设备A,被发现设备包括设备B、设备C、设备D以及设备X。
首先,设备A订阅设备B、设备C、设备D以及设备X发布的服务或者能力信息,设备A便可以启动发现监听。设备B、设备C、设备D以及设备X分别在不同的时间广播自己具有的能力信息和/或服务信息等。设备A便可以监听到设备B、设备C、设备D以及设备X分别广播的能力信息和/或服务信息,这样设备A便可以获取或者发现周边设备具有的能力信息和/或服务信息。
可选的,设备B、设备C、设备D以及设备X分别广播的报文中还可以携带各个设备自身的能力信息等。
下面结合图1所示的场景说明本申请提供的发现和连接电子设备的方法。在图1所示的场景中,假设:用户使用的第一电子设备(智能手机110)具有BT、Wi-Fi、NFC、USB、Zigbee、Cellular等能力,其中,Wi-Fi可以包括频率为2.4GHz和5GHz两种,分别用Wi-Fi(2.4GHz)和Wi-Fi(5GHz)表示。家庭中的第二电子设备(大屏设备120)具有BT、Wi-Fi、USB、NFC、Cellular等能力。智能手机110利用主动发现方式发现大屏设备120。假设智能手机110和大屏设备120之间已经利用USB进行了连接。在图1所示的场景中,智能手机可以理解为发现端设备,大屏设备可以理解为被发现端设备或者扫描端设备。
图6所示的为在图1所示的场景中,本申请提供的一例发现和连接电子设备的方法300的示意性流程图。如图6所示的,该方法300包括:S301至S310。
S301,用户触发智能手机主动发现周边设备。在本申请实施例中,用户可以通过如下两种操作方式触发智能手机主动发现周边设备:
第一种操作方式:假设用户需要利用智能手机向大屏设备传输文件,如图7中的a所示的,用户在智能手机上打开文“文件管理”应用,显示的界面如图7中的b所示的,用户选择需要分享的文件(例如为文件1),点击“分享”,选择分享方式。显示的界面如图7中的c所示的,在本申请实施例中,用户可以点击“全选”按钮,则意味着用户利用蓝牙、Wi-Fi、NFC、USB、Zigbee、移动网络这几种方式同时进行发现其他设备。可选的,用户还可以根据自己需求,在蓝牙、Wi-Fi、NFC、USB、Zigbee、移动网络这几种方式中选择任意多种方式。假设智能手机和大屏之间没有利用USB连接,则用户可以点击“蓝牙”、“Wi-Fi”、“NFC”、“Zigbee”、“移动网络”这几种方式下面的选择框,从而选择这几种发现方式同时发现其他设备。在用户点击“全选”按钮后,智能手机会同时利用蓝牙、Wi-Fi、NFC、USB、Zigbee、移动网络发现周围的其它设备。智能手机进行周围设备扫描后,将扫描到的设备列表显示给用户,该设备列表中包含有一个或多个设备的设备标识。例如,显示的设备列表可以如图7中的d所示的。用户可以根据需要在该设备列表上选择一个设备(例如为大屏设备),在用户选择大屏设备后,智能手机和大屏设备之间会根据需要传输的业务以及网络环境等,自动从双方设备均支持的连接方式中选择最优的连接方式进行连接,从而进行文件的传输。
第二种操作方式:假设用户的目的仅仅是为了将智能手机和大屏设备进行连接,方便后续有数据或者文件分享时快捷的进行文件传输。用户在如图8中的a所示的界面上点击“设置”,显示的界面如图8中的b所示的,在本申请实施例中,用户可以点击“全选”开启按钮,则意味着用户利用蓝牙、Wi-Fi、NFC、USB、Zigbee、移动网络这几种方式同时进行发现其他设备。可选的,用户还可以根据自己需求,在蓝牙、Wi-Fi、NFC、USB、Zigbee、移动网络这几种方式中选择任意多种方式,例如,假设智能手机和大屏之间没有利用USB连接,则用户可以点击“蓝牙”、“Wi-Fi”、“NFC”、“Zigbee”、“移动网络”分别对应的开启按钮,从而选择这几种发现方式发现其他设备。在用户点击“全选”按钮后,智能手机会同时利用蓝牙、Wi-Fi、NFC、USB、Zigbee、移动网络发现周围的其它设备。智能手机进行周围设备扫描后,将扫描到的设备列表显示给用户,该设备列表中包含有一个或多个设备的设备标识。例如,显示的设备列表可以如图8中的c所示的。用户可以根据需要在该设备列表上选择一个设备(例如为大屏设备),在用户选择大屏设备后,智能手机和大屏设备之间会根据需要传输的业务以及网络环境等,自动从双方设备均支持的连接方式中选择最优的连接方式进行连接,从而完成将智能手机和大屏进行连接。
可选的,在本申请实施例中,在图8中的c所示显示的设备列表之后,如图8中的d所示的,智能手机还可以将显示的设备列表中每一个设备所支持的连接技术或者能力显示给用户,一个设备支持的连接技术或者能力可以理解为该设备所支持的一种或者多种连接类型,用户便可以查看每个设备支持的连接技术。
可选的,在本申请实施例中,在图7中的c所示界面之后,智能手机也可以显示如图8中的d所示的显示界面。换句话说,图7中的d所示的界面可以由图8中的d所示的界面替换。
应理解,在本申请实施例中,除了上述的两种操作方式之外,用户还可以通过其他操作方式触发智能手机主动发现周边设备,本申请实施例在此不作限制。
在S302中,智能手机在接收到用户触发智能手机主动发现周边设备的操作后,通过自己具有的所有能力(BT、Wi-Fi、NFC、USB、Zigbee、Cellular等),或者具有的所有能力中的多种能力同时广播或者发送报文。在本实施例实例,例如智能手机利用BT、Wi-Fi、NFC、USB、Zigbee、移动网络这几种方式(能力)同时向周围设备广播或者发送服务查询请求(也可以称为广播报文)。换句话说,智能手机通过BT方式向周围设备广播一个服务查询请求(为了区分,称为第一服务查询请求)。智能手机通过Wi-Fi方式向周围设备广播一个服务查询请求(为了区分,称为第二服务查询请求),智能手机通过USB方式向周围设备发送一个服务查询请求(为了区分,称为第三服务查询请求),智能手机通过NFC方式向周围设备广播一个服务查询请求(为了区分,称为第四服务查询请求),智能手机通过Zigbee方式向周围设备广播一个服务查询请求(为了区分,称为第五服务查询请求),智能手机通过移动网络(即蜂窝网络(Cellular))方式向周围设备广播一个服务查询请求(为了区分,称为第六服务查询请求)。这六个服务服务查询请求为智能手机同时通过广播的方式广播的。
可选的,在本申请实施例中,这六个服务服务查询请求可以分别用于查询周边设备具有的能力,或者,用于查询周边设备是否具有某几种特定的能力。在此基础上, 这六个服务服务查询请求还可以分别用于查询周边设备具有的服务信息,或者,用于查询周边设备是否具有某几种特定的服务信息等。
在本申请实施例中,六个服务服务查询请求是智能手机同时发送的。在本申请实施例中,“同时发送或者同时广播”可以理解为在一个时间窗的时间长度内,智能手机在该时间窗内,同时利用不冲突的多种通信技术分别发送或者广播服务查询请求(即利用多种不冲突的通信技术分别发送或者广播服务查询请求的时间段在时域上是有重叠的,可以是部分重叠或者全部重叠,例如:多种不冲突的通信技术可以分别同时开始发送或者广播服务查询请求)。在此基础上,在该时间窗内,同时利用另外一种通信技术发送或者广播服务查询请求,如果另外一种通信技术和该时间窗内用来发送或者广播服务查询请求的某一个通信技术有冲突,则利用相互冲突的多种通信技术,在该时间窗内分时发送或者广播服务查询请求。换句话说,本申请实例中的“同时发送”可以理解为:智能手机在一个时间窗的时间粒度内,需要利用多种不同的通信技术同时或者分时发送或者广播服务查询请求。
或者,本申请实施例中,“同时发送或者同时广播”可以理解为:利用第一通信技术在第一时间段上发送或者广播第一服务查询请求,利用第二通信技术在第二时间段上发送或者广播第一服务查询请求,如果第一通信技术和第二通信技术不冲突(例如不存在信道、空口时序上等的冲突),则第一时间段和第二时间段是时域上可以存在重叠(可以是部分重叠或者全部重叠)。在此基础上,利用第三通信技术在第三时间段上发送或者广播第三服务查询请求,如果第三通信技术与第一通信技术或者第二通信技术存在冲突(例如存在信道、空口时序上等的冲突),则第三时间段和第一时间段在时域上是没有重叠的,或者,第三时间段和第二时间段在时域上是没有重叠的。即“同时发送”可以理解为:利用多种不冲突的通信技术分别发送或者广播服务查询请求的时间段在时域上是有重叠的(部分重叠或者全部重叠),而利用相互冲突的通信技术分别发送或者广播服务查询请求的时间段在时域上是没有重叠的。
在本申请实施例中,第一服务查询请求还包括:Wi-Fi能力指示信息、NFC能力指示信息、USB能力指示信息、Zigbee能力指示信息以及移动网络能力指示信息。其中,Wi-Fi能力指示信息用于指示智能手机还利用了Wi-Fi方式广播了服务查询请求。NFC能力指示信息用于指示智能手机还利用了NFC方式广播了服务查询请求。USB能力指示信息用于指示智能手机还利用了USB方式发送了服务查询请求。Zigbee能力指示信息用于指示智能手机还利用了Zigbee方式广播了服务查询请求。移动网络能力指示信息用于指示智能手机还利用了蜂窝网络方式广播了服务查询请求。
可选的,第一服务查询请求还包括:BT能力指示信息,BT能力指示信息用于指示智能手机还利用了BT方式广播了服务查询请求。
类似的,第二服务查询请求至第二服务查询请求中,分别携带用于指示该智能手机还利用了其具有的其他能力同时广播或者发送服务查询请求的指示信息。
也就是说,利用不同方式广播的服务查询请求中,分别携带了:用于指示该智能手机同时利用了其具有的其他所有能力同时广播或者发送服务查询请求的指示信息。
可选的,在本申请实施例中,作为另一种可能的实现方式,BT能力指示信息还可以用于指示智能手机还具有BT通信能力,Wi-Fi能力指示信息还可以用于指示智能手 机还具有Wi-Fi通信能力,NFC能力指示信息还可以用于指示智能手机还具有NFC通信能力。USB能力指示信息还可以用于指示智能手机还具有USB通信能力。Zigbee能力指示信息还可以用于指示智能手机还具有Zigbee通信能力。换句话说,各种能力指示信息还可以用于指示智能手机具有某种通信能力,而并不意味着智能手机利用该通信能力发送或者广播了服务查询请求。
可选的,在本申请实施例中,例如:如果用户的智能手机支持蓝牙通信能力,但是用户在智能手机上将“蓝牙”关闭,在这种情况下,智能手机将不能通过蓝牙的方式广播服务查询请求。但是在利用其它通信技术广播或者发送的服务查询请求中,可以携带蓝牙能力指示信息,蓝牙能力指示信息用于指示智能手机具有蓝牙通信能力。或者,在利用其它通信技术广播或者发送的服务查询请求中也可以不携带蓝牙能力指示信息,即不会让对端设备获知该智能手机是否支持蓝牙通信能力。
可选的,在本申请实施例中,除了在上述的六个服务查询请求分别携带其他能力指示信息的方式,向大屏设备通知智能手机还利用了其他能力向大屏设备广播或者发送服务查询请求,或者智能手机具有其他某种通信能力之外,还可以通过其他可选的方式:
例如,作为一种可能的实现方式:智能手机和大屏设备之间提前协商好规则,例如,在每个查询请求中可以设置一个字段(例如为指示字段),该字段用于指示智能手机是否利用了其他能力向大屏设备广播服务查询请求,或者智能手机是否具有其他某种通信能力。例如,该字段长度为6比特(bit)。该字段在每个查询请求中位置是固定的(例如位于每个服务查询请求中的第n个字段),智能手机和大屏设备均提前获知了该字段的位置以及该字段上每个比特位所表示的含义。
例如,在6比特的字段中,第一个比特指示:智能手机是否利用了BT方式广播了服务查询请求,其中,比特位上的值为1,表示智能手机是利用了BT方式广播了服务查询请求,比特位上的值为0,表示智能手机没有利用BT方式广播了服务查询请求。类似的,第二个比特指示:智能手机是否利用了Wi-Fi方式广播了服务查询请求,其中,比特位上的值为1,表示智能手机是利用了Wi-Fi方式广播了服务查询请求,比特位上的值为0,表示智能手机没有利用Wi-Fi方式广播了服务查询请求。第三个比特指示:智能手机是否利用了NFC方式广播了服务查询请求,其中,比特位上的值为1,表示智能手机是利用了NFC方式广播了服务查询请求,比特位上的值为0,表示智能手机没有利用NFC方式广播了服务查询请求。第四个比特指示:智能手机是否利用了USB方式发送了服务查询请求,其中,比特位上的值为1,表示智能手机是利用了USB方式发送了服务查询请求,比特位上的值为0,表示智能手机没有利用USB方式发送了服务查询请求。第五个比特指示:智能手机是否利用了Zigbee方式广播了服务查询请求,其中,比特位上的值为1,表示智能手机是利用了Zigbee方式广播了服务查询请求,比特位上的值为0,表示智能手机没有利用Zigbee方式广播了服务查询请求。第六个比特指示:智能手机是否利用了Cellular方式广播了服务查询请求,其中,比特位上的值为1,表示智能手机是利用了Cellular方式广播了服务查询请求,比特位上的值为0,表示智能手机没有利用Cellular方式广播了服务查询请求。智能手机和大屏设备提前协商好该字段的指示规则。这样,利用这个指示字段,便可以实现: 指示该智能手机同时是否利用了其具有的其他能力同时广播服务查询请求。
又例如,作为另一种可能的实现方式:智能手机和大屏设备可以提前协商好一个规则:利用不同的特殊字符串(例如:一个特殊字符串可以为一个特定的序列,该序列可以由:数字、字母或者特殊字符中的至少一种组成)分别表示不同的能力,并且,在每个查询请求中可以存在或者不存在这些不同的特殊字符串。例如,可以存在6个不同的特殊字符串,6个不同的特殊字符串分别表示BT、Wi-Fi、NFC、USB、Zigbee、Cellular能力。如果在某一个查询请求中存在某一个特殊字符串,则表示:智能手机还利用了该特殊字符串对应的能力向大屏设备广播服务查询请求,或者,智能手机还具有该特殊字符串对应的通信能力,如果不存在,则表示:智能手机没有利用该特殊字符串对应的能力向大屏设备广播服务查询请求,或者,智能手机不具有该特殊字符串对应的通信能力。智能手机和大屏设备提前协商好不同的特殊字符串的指示规则。这样,利用这些不同的特殊字符串,便可以实现:指示该智能手机是否利用了其具有的其他能力同时广播服务查询请求,或者智能手机是否还具有其他通信能力。
在本申请实施例中,上述的六个服务查询请求中还分别携带一个随机值(也可以称为随机码),六个服务查询请求分别携带的随机值均相同,该随机值由智能手机随机生成。应理解,智能手机可以在不同的时间生成不同的随机值,该随机值用于唯一标识智能手机,即随机值用于唯一标识一个设备。在同一次发送的多个服务查询请求中携带的随机值相同,在不同次发送的服务查询请求中携带的随机值不相同。
应理解,在本申请实施例中,智能手机通过自己具有的所有能力(BT、Wi-Fi、NFC、USB、Zigbee、Cellular等)同时广播或者发送报文时,由于不同的能力或者技术均有各种对应的协议规定,利用多个不同技术广播报文时可能存在信道、空口时序上等的冲突问题,即利用不同技术广播的报文之间可能会存在干扰,因此,在智能手机利用BT、Wi-Fi、NFC、USB、Zigbee、Cellular等方式同时广播报文时,可以采用如下所描述的冲突避让机制。
表1:使用不同技术同时广播报文时的冲突表
Figure PCTCN2022083364-appb-000002
表1所示的为使用不同技术同时广播报文时的冲突情况。如表1所示的,表1中的“冲突”表示利用两种不同的技术同时广播报文时存在信号干扰(例如存在信道干扰 或者空口时序上的冲突等),需要采用分时策略的方式利用这两种技术广播报文。“不冲突”表示利用两种不同的技术同时广播报文时不存在信号干扰,可以同时利用这两种技术同时广播报文。
具体而言,由于USB和NFC、分别与BT(以BLE为例进行说明)和Wi-Fi之间无任何信号干扰,因此USB、NFC可以常开监听扫描,即无论智能手机是否利用其它技术广播服务查询请求,均可以同时利用USB和NFC分别发送和广播服务查询请求。而BLE和Wi-Fi之间由于存在2.4GHz干扰,因此利用BLE、Wi-Fi(2.4GHz)做广播时,会通过分时策略来避免空口冲突,在协商的指定信道上进行广播。
应该理解,在本申请实施例中,分时策略涉及芯片级的具体信道的控制。具体而言,在两种或者多种不冲突的技术上采用并行发现的方式,即利用不冲突的多种技术同时广播发现设备报文,而在两种或者多种冲突的技术或者信道上采用时分策略,即在两种或者多种冲突的技术或者信道上,分时广播发现设备报文。
在本申请实施例中,分时策略首先会同步智能手机和大屏设备的多芯片的时钟策略,并根据同步后的时钟策略,规划智能手机多芯片的广播窗口与大屏设备多芯片的扫描窗口策略,其中广播窗口的时长长度要小于扫描窗口的时间长度。发现设备(智能手机)与被发现设备(大屏设备)分别在广播窗口与扫描窗口上进行数据包的交互,从而实现利用多技术同时发现其他设备的目的。
下面以BLE、Wi-Fi(2.4GHz)为例说明智能手机分别利用BLE、Wi-Fi(2.4GHz)广播服务查询请求时的分时策略。图9所示的为一例BLE、Wi-Fi(2.4GHz)在不同的时隙上广播服务查询请求的示意图。如图9所示的,第一行的每一个小框表示一个时隙(slot),小框中的数字表示时隙的编号。针对于智能手机而言,图9中所示的各个时隙可以称为广播时隙。例如,每个时隙的时间的长度可以为1ms或者0.5ms,第二行表示Wi-Fi(2.4GHz)的信道(channel),第二行上的一个小框表示Wi-Fi(2.4GHz)的一个信道,小框中的数字表示信道的编号(Channel Sequence)。第三行上的一个小框表示BLE的一个信道,小框中的数字表示BLE信道的编号。其中,对于Wi-Fi(2.4GHz)技术而言,第1信道、第6信道以及第11信道为广播信道。对于BLE技术而言,第37信道、第38信道以及第39信道为广播信道。
如图9所示的,每个时隙上仅可以在某一技术(或者能力)的固定信道上面发送数据,例如在第1个时隙上,在Wi-Fi 2.4GHz的第1信道上广播服务查询请求,在第2个时隙上,在Wi-Fi 2.4GHz的第6信道上广播服务查询请求,第3个时隙上,在Wi-Fi 2.4GHz的第11信道上广播服务查询请求。第4个时隙上,在BLE的第37信道上广播服务查询请求,第5个时隙上,在BLE的第38信道上广播服务查询请求,第6个时隙上,在BLE的第39信道上广播服务查询请求。换句话说,在智能手机同时利用BLE、Wi-Fi(2.4GHz)广播服务查询请求时,在第1个至第3个时隙上,仅仅利用Wi-Fi(2.4GHz)技术,在不同的信道上广播服务查询请求,在第4个至第6个时隙上,仅仅利用BLE技术,在不同的信道上广播服务查询请求,从而实现了BLE、Wi-Fi(2.4GHz)的分时广播报文,解决了智能手机同时利用BLE、Wi-Fi(2.4GHz)广播服务查询请求时的在同频上的空口冲突问题。
对于表1中,同时利用任意两种技术广播服务查询请求时存在冲突的情况,也可 以利用和图9所示的类似方式,实现分时广播服务查询请求,从而解决不用技术之间存在的空口冲突问题。
在本申请实施例中,如果上述的六个服务查询请求用于查询周边设备是否具有某几种能力或者服务,则上述的六个服务查询请求分别携带:目标设备的名称、目标设备的类型、目标设备需要支持的目标能力或者目标服务。该目标服务可以包括目标服务的服务名称、服务ID、服务属性等。例如,上述的六个服务查询请求分别携带:是否具有BT、Wi-Fi、USB、NFC、Cellular能力,和/或,是否具有文件分享服务、打印、投屏等服务。
可选的,上述的六个服务查询请求分别还可以携带:智能手机自身的能力信息(例如包括:智能手机名称、智能手机的设备类型、智能手机的能力或者服务能力等)。如果上述的六个服务查询请求中不携带智能手机自身的能力信息,则在六个服务查询请求之后,智能手机和大屏设备需要进行额外的广播报文的交互,使得大屏设备获取智能手机自身的能力信息。或者,在智能手机和大屏设备在连接的过程中交互智能手机自身的能力信息。
应理解,在本申请实施例中,上述的六个服务查询请求可以是多次发送的,例如,在第一时刻发送上述的六个服务查询请求,在第一时刻后的某个时刻,智能手机可以重复的发送上述的六个服务查询请求或者上述的六个服务查询请求中的任意多个。可选的,智能手机可以周期性的发送上述的六个服务查询请求。
在S303中,大屏设备会根据自身的条件,在BT、Wi-Fi、USB、NFC、Cellular中选择一种或者多种技术进行监听(也可以称为扫描)周边设备广播的报文。例如,大屏设备可以根据自己支持的能力、时延要求以及功耗等选择,在自己支持的能力中(在BT、Wi-Fi、USB、NFC、Cellular中)选择一种或者几种能力进行监听。
在S303中,由于大屏设备会选择BT、Wi-Fi、USB、NFC、Cellular中选择一种或者多种技术同时进行监听(扫描)周边设备广播的报文,也会存在不同技术在信道、空口时序上等的冲突问题。例如,当大屏设备同时利用BLE、Wi-Fi(2.4GHz)进行扫描或者监听时,大屏设备可以复用当前现有的扫描技术,在Wi-Fi(2.4GHz)与BLE芯片上做同时扫描,也可以按照S302中描述分时策略利用不同技术进行扫描,即利用图7所示的时隙关系,在不同的时隙利用不同的技术进行扫描。
对于大屏设备而言,图9中所示的各个时隙可以称为扫描时隙。例如在第1个时隙上,在Wi-Fi 2.4GHz的第1信道上进行Wi-Fi扫描,在第2个时隙上,在Wi-Fi 2.4GHz的第6信道上进行Wi-Fi扫描,在第3个时隙上,在Wi-Fi 2.4GHz的第11信道上进行Wi-Fi扫描。在第4个时隙上,在BLE的第37信道上进行BLE扫描,在第5个时隙上,在BLE的第38信道上进行BLE扫描,在第6个时隙上,在BLE的第39信道上进行BLE扫描,换句话说,在大屏设备同时利用BLE、Wi-Fi(2.4GHz)扫描时,在第1个至第3个时隙上,仅仅利用Wi-Fi(2.4GHz)进行Wi-Fi扫描,在第4个至第6个时隙上,仅仅利用BLE进行BLE扫描,从而实现了BLE、Wi-Fi(2.4GHz)的分时扫描,解决了大屏设备同时利用BLE、Wi-Fi(2.4GHz)进行扫描时的空口冲突问题。
可选的,在本申请实施例中,当大屏设备按照上述的时隙顺序进行扫描时,可以 将扫描分成两个阶段进行,即粗匹配阶段和精确匹配阶段:
粗匹配阶段:当大屏设备(被发现端设备)做扫描时,没有与任何发现设备做过时隙同步的情况下,为了使大屏设备更容易扫描到智能手机广播的服务查询请求,大屏设备的扫描时隙的时间长度需要为智能手机的广播时隙长度的2倍或者2倍以上。
精确匹配阶段:当大屏设备扫描到智能手机广播的服务查询请求后,会与智能手机做时隙同步,此时大屏设备的扫描时隙可以与智能手机的扫描时隙的长度相同。
例如,在本申请实施例中,智能手机的广播时隙的时间长度可以为1ms,大屏设备的扫描时隙的时间长度可以为2ms,这样,作为扫描端设备的大屏设备可以更容易地发现更多广播设备。在大屏设备与智能手机做完时隙同步之后,大屏设备的扫描时隙的时间长度可以由2ms可以降低至1ms,这样便与智能手机的广播时隙的长度一致,方便广播设备(即智能手机)与扫描设备(即大屏设备)进行广播数据交互。
S304中,在大屏设备监听到或者扫描到智能手机广播的六个服务查询请求中的全部查询请求或者部分查询请求后,假设:大屏设备监听到了第一服务查询请求、第二服务查询请求、第三服务查询请求、第四服务查询请求以及第六服务查询请求。大屏设备根据第一服务查询请求,确定智能手机的BT对应的媒体接入控制(media access control,MAC)地址,下文简称为BT MAC地址。根据第二服务查询请求,确定智能手机的Wi-Fi对应的MAC地址,下文简称为Wi-Fi MAC地址。根据第三服务查询请求,确定智能手机的USB对应的MAC地址,下文简称为USB MAC地址。根据第四服务查询请求,确定智能手机的NFC对应的MAC地址,下文简称为NFC MAC地址。根据第六服务查询请求,确定智能手机的蜂窝网络对应的MAC地址,下文简称为蜂窝网络的MAC地址,蜂窝网络的MAC地址可以理解为智能手机网络协议(internet protocol,IP地址)。并且,大屏设备根据第一服务查询请求、第二服务查询请求、第三服务查询请求、第四服务查询请求以及第六服务查询请求分别携带的随机值,确定第一服务查询请求、第二服务查询请求、第三服务查询请求、第四服务查询请求以及第六服务查询请求均来自于同一个设备。大屏设备可以根据这些信息,获取智能手机的网络标识信息,该网络标识信息包括:BT MAC、Wi-Fi MAC、USB MAC、NFC MAC、IP,即该网络标识信息包括智能手机的五个参数,这五个参数分别是:智能手机的BT MAC地址,智能手机的Wi-Fi MAC地址,智能手机的USB MAC地址,智能手机的NFC MAC地址,智能手机的IP地址。该网络标识信息用于唯一标识该智能手机。
应理解,在本申请实施例中,电子设备的网络标识信息为该电子设备的多个地址组成的一个集合或者组合,其中,电子设备的一个地址(例如为BT MAC地址)为该网络标识信息中的一个元素。该网络标识信息可以包括多个元素。并且,该网络标识信息包括的元素的个数是可扩展的,即可以是动态变化的。例如:第一电子设备的网络标识信息可以包括四个元素,分别为:BT MAC地址、Wi-Fi MAC地址、USB MAC地址、IP地址。或者,第一电子设备的网络标识信息也可以包括五个元素,分别为:BT MAC地址、Wi-Fi MAC地址、USB MAC地址、NFC MAC地址、IP地址。
可选的,在本申请实例中,电子设备的网络标识信息可以利用集合或者组合方式表示。
应理解,在本申请实施例中,作为另外一种可能的实现方式,上述的第一服务查 询请求至第五服务查询请求中分别还可以携带智能手机的IP地址,在这种情况下,大屏设备也可以获得智能手机的IP地址。或者,如果第一服务查询请求至第五服务查询请求不携带大屏设备的IP地址,则在大屏设备接收到该第一服务查询请求至第五服务查询请求后,大屏设备还可以向智能手机发送广播报文来询问智能手机的IP地址以及其他能力信息,从而获取到智能手机的IP地址。
在大屏设备同一次发现其他设备的过程中,由于智能手机是重复的发送服务查询请求,在下一次智能手机发送上述的六个服务查询请求中的一个或者多个时,由于大屏设备已经获取并且保存了智能手机的网络标识信息,在大屏设备下一次接收到智能手机发送的一个或者多个服务查询请求时,如果该一个多个服务查询请求中均携带相同的随机值,大屏设备根据接收到多个服务查询请求中分别携带的相同的随机值,便可以确定多个服务查询请求均来自于同一个设备(例如称为第一设备),进一步的,根据多个服务查询请求中不同服务查询请求分别携带的地址,例如为:BT MAC地址、Wi-Fi MAC地址、USB MAC地址、NFC MAC地址、或IP地址中的多个,大屏设备根据这些信息,结合之前存储的智能手机的网络标识信息,将两者进行对比(例如通过向量计算数据的距离的方式),便可以确定第一设备和智能手机为同一个设备,即进行设备的去重处理,从而过滤掉重复的信息。利用设备的网络标识信息标识设备,设备的网络标识信息是可以变化的,可以根据设备支持的能力的变化进行动态拓展与更新,因此设备的网络标识信息是可以动态拓展的,利用设备的网络标识信息来标识设备,可以有效的防止设备ID信息被追踪,解决了现有技术中利用设备的唯一ID来标识设备时容易被跟踪的问题,提高设备的安全性。
或者,作为另一种可能的实现方式,在大屏设备同一次发现其他设备的过程中,由于智能手机是重复的发送服务查询请求,在下一次智能手机发送一个多个服务查询请求时,由于大屏设备已经获取并且保存了智能手机的网络标识信息,在大屏设备下一次接收到智能手机发送的一个多个服务查询请求中时,如果该一个多个服务查询请求中均不携带随机值,则大屏设备根据一个多个服务查询请求中分别携带的地址,例如为:BT MAC地址、Wi-Fi MAC地址、USB MAC地址、NFC MAC地址、或IP地址中的一个或者多个,大屏设备根据这些地址信息,结合之前存储的智能手机的网络标识信息,将两者进行对比,也可以确定该一个多个服务查询请求也来自于智能手机,即进行设备的去重处理,从而过滤掉重复的信息。
应理解,在本申请实例中,在大屏设备不同次的设备发现过程中,例如,大屏设备每间隔5分钟做一次设备发现,前一次发现的设备与后一次发现的设备也需要做去重处理,将相同设备的广播内容识别为同一设备,其去重处理的方式和上述的过程一致,为了简洁,此处不再赘述。
在本申请实施例中,在大屏设备收到多个服务查询请求,并识别出多个服务查询请求均来自于同一个智能手机时,大屏设备可以将多个服务查询请求携带的信息进行共享。例如,例如,在同一次发现设备的过程中,假设:大屏设备同时收到智能手机分别利用BT方式和Wi-Fi方式广播的服务查询请求后,由于利用BT方式广播的服务查询请求与利用Wi-Fi方式广播的服务查询请求携带数据量不一样,利用Wi-Fi方式广播的服务查询请求携带数据量大,利用BT方式广播的服务查询请求携带数据量小, 在大屏设备接收到智能手机利用Wi-Fi方式广播的服务查询请求后,便可以将利用Wi-Fi方式广播的服务查询请求携带的信息进行过滤和去重处理,这样可以避免智能手机和大屏设备之间多次利用BT方式进行交互,从而节省信令的开销,提高资源的利用率。
又例如,在不同次的发现设备过程中:大屏设备后一次扫描到的设备,与大屏设备前一次扫描到的设备,如果通过设备的网格标识进行匹配,经过匹配后为同一设备的话,大屏设备后一次扫描的设备可以共享大屏设备之前扫描到的设备能力或者服务信息,大屏设备只需要做一些设备能力或者服务信息同步即可,需要再完整同步设备能力与服务信息,从而节省信令的开销,提高资源的利用率。
在S305中,在大屏设备监听到智能手机广播的六个服务查询请求中的全部查询请求或者部分查询请求后,可以选择大屏设备具有的能力中的一种或者多种能力向智能手机回复消息(即向智能手机回复响应信息)。例如,大屏设备会根据自己的设备能力以及场景的要求进行选择,由于大屏设备为常供电设备,其Wi-Fi与BLE可以是常开的,在收到智能手机的广播的多个服务查询请求后,可以选择Wi-Fi、BLE的方式同时向智能手机回复广播报文。又例如,大屏设备还可以根据不同能力的功耗、不同的能力的时延等,在BT(BLE)、Wi-Fi、USB、NFC、Cellular等能力中选择BLE、Wi-Fi这两种能力,即利用BLE、Wi-Fi这两种方式同时向智能手机回复消息。
假设:大屏设备最终选择Wi-Fi、BLE的方式同时向智能手机回复消息。
其中,利用BLE方式,通过广播的形式向智能手机回复的第一消息包括:Wi-Fi能力指示信息、USB能力指示信息、NFC能力指示信息、Cellular能力指示信息以及一个随机值(或者也可以称为随机码)。Wi-Fi能力指示信息用于大屏设备具有或者不具有Wi-Fi通信能力。USB能力指示信息用于指示大屏设备具有或者不具有USB通信能力,NFC能力指示信息用于指示大屏设备具有或者不具有NFC通信能力,Cellular能力指示信息用于指示大屏设备具有或者不具有蜂窝网络通信能力。该随机值由大屏设备生成,用于唯一标识大屏设备,即随机值用于唯一标识一个设备。该随机值由大屏设备随机生成。应理解,大屏设备可以在不同的时间生成不同的随机值,该随机值用于唯一标识大屏设备,在大屏设备同一次发送的多个信息中携带的随机值相同,在大屏设备不同次发送的信息中携带的随机值不相同。
可选的,该第一消息中还可以包括:BLE能力指示信息,该BLE能力指示信息用于指示大屏设备还具有BLE通信能力。或者,第一消息中也可以不包括:BLE能力指示信息。
利用Wi-Fi方式,通过广播的形式向智能手机回复的第二消息包括:BT能力指示信息、USB能力指示信息、NFC能力指示信息、Cellular能力指示信息以及一个随机值(或者也可以称为随机码)。BT能力指示信息用于指示大屏设备具有或者不具有BT通信能力,其它能力指示信息的作用和第一消息中的作用相同,第二消息中的随机值由大屏设备生成,用于唯一标识大屏设备,该随机值和第一消息中的随机值相同。
可选的,该第二消息中还可以包括:Wi-Fi能力指示信息,该Wi-Fi能力指示信息用于指示大屏设备还具有Wi-Fi通信能力。或者,第一消息中也可以不包括:Wi-Fi能力指示信息。
可选的,在本申请实施例中,除了在上述的第一消息和第二消息分别携带其他能力指示信息的方式,向智能手机通知大屏设备还具有其他能力之外,还可以通过其他可选的方式。
例如,作为一种可能的实现方式:智能手机和大屏设备之间提前协商好规则,例如,在回复的消息(第一消息和第二消息)中分别可以设置一个字段,该字段用于指示大屏设备还具有其他能力。例如,该字段长度为5比特(bit)。该字段在每个消息中位置是固定的,智能手机和大屏设备均提前知道该字段的位置以及该字段上每个比特位所表示的含义。
在5比特的字段中,第一个比特指示:大屏设备是否具有BLE通信能力,其中,比特位上的值为1,表示大屏设备具有BLE通信能力,比特位上的值为0,表示大屏设备不具有BLE通信能力。类似的,第二个比特指示:大屏设备是否具有USB通信能力,其中,比特位上的值为1,表示大屏设备具有USB通信能力,比特位上的值为0,表示大屏设备不具有USB通信能力。第三个比特指示:大屏设备是否具有NFC通信能力,其中,比特位上的值为1,表示大屏设备具有NFC通信能力,比特位上的值为0,表示大屏设备不具有NFC通信能力。第四个比特指示:大屏设备是否具有Wi-Fi通信能力,其中,比特位上的值为1,表示大屏设备具有Wi-Fi通信能力,比特位上的值为0,表示大屏设备不具有Wi-Fi通信能力。第五个比特指示:大屏设备是否具有Cellular通信能力,其中,比特位上的值为1,表示大屏设备具有Cellular通信能力,比特位上的值为0,表示大屏设备不具有Cellular通信能力。大屏设备和智能手机提前协商好该字段的指示规则。这样,利用这个指示字段,便可以实现指示大屏设备还具有其他能力。
又例如,作为另一种可能的实现方式:大屏设备和智能手机可以提前协商好一个规则:利用不同的特殊字符串(例如:一个字符串可以为一个特定的序列,该序列可以由:数字、字母或者特殊字符中的至少一种组成)分别表示不同的能力。并且,在每个回复的消息(第一消息和第二消息)中可以存在或者不存在这些不同的特殊字符串,例如,可以为5个不同的特殊字符串,5个不同的特殊字符串分别表示BT通信能力、Wi-Fi通信能力、NFC通信能力、USB通信能力、Cellular通信能力。如果在某一个消息中存在某一个特殊字符串,则表示:大屏设备还具有该特殊字符串对应的通信能力,如果不存在,则表示:大屏设备不具有该特殊字符串对应的通信能力。大屏设备和智能手机提前协商好特殊字符串的指示规则。这样,利用这些不同的特殊字符串,便可以实现指示大屏设备还具有其他通信能力。
应理解,在本申请实例中,例如:如果大屏设备支持蓝牙通信能力,但是大屏设备上的“蓝牙”处于关闭状态,在这种情况下,大屏设备将不能通过蓝牙的方式向智能手机回复消息。但是大屏设备在利用其它通信技术广播或者发送的消息中,可以携带蓝牙能力指示信息,用于指示大屏设备具有蓝牙通信能力。或者,在利用其它通信技术广播或者发送的消息也可以不携带蓝牙能力指示信息,即不会让对端设备(智能手机)获知该大屏设备是否支持蓝牙通信能力。
可选的,第一消息和第二消息中还可以分别携带:大屏设备其它的能力或者服务信息(例如包括:大屏设备的名称、大屏设备的设备类型等)。如果第一消息和第二 消息中不携带大屏设备其它的能力或者服务信息,则在第一消息和第二消息之后,大屏设备和智能手机需要进行额外的广播报文的交互,使得智能手机获取大屏设备其它的能力或者服务信息。或者,在智能手机和大屏设备在连接的过程中交互大屏设备其它的能力或者服务信息。
在本申请实施例中,如果智能手机广播的服务查询请求用于查询周边设备具有的目标能力以及目标服务信息(例如BT、Wi-Fi、USB、NFC、Cellular中的一个或者多个,文件分享服务以及投屏服务等),则大屏设备需要匹配设备的能力以及服务信息,即大屏设备需要根据服务查询请求携带的目标能力或者目标服务的信息,确定大屏设备是否满足目标能力以及目标服务,如果满足目标能力以及目标服务,则向智能手机回复第一消息和第二消息,第一消息和第二消息中还可以携带指示信息,用于指示大屏设备具有目标能力或者目标服务的详细信息。例如,第一消息和第二消息中分别存在指示信息,该指示信息用于指示大屏设备具有BT、Wi-Fi、USB、NFC、Cellular等能力,以及支持文件分享服务以及投屏服务等。如果不满足目标能力或者目标服务,则大屏设备不会向智能手机回复第一消息和第二消息。或者,如果不满足目标能力或者目标服务,则大屏设备也会向智能手机回复第一消息和第二消息,第一消息和第二消息包括:用于指示不具有目标能力或者目标服务的指示信息。
S306中,智能手机在接收到大屏设备利用BT方式回复的第一消息以及利用Wi-Fi方式回复的第二消息后,也会获取大屏设备的网络标识信息。具体的,智能手机根据第一消息,可以确定大屏设备的BT MAC地址,根据第二信息,确定大屏设备的Wi-Fi MAC地址。可选的,智能手机还可以获取大屏设备的IP地址,智能手机根据第一消息和第二消息中携带的随机值,确定第一消息和第二消息均来自于同一个智能手机。智能手机可以根据这些信息,获取大屏设备的网络标识信息,该网络标识信息包括:BT MAC、Wi-Fi MAC。IP。该网络标识信息用于唯一标识该大屏设备。可选的,如果智能手机没有获取到大屏上的IP地址,则该网络标识信息包括:BT MAC、Wi-Fi MAC。即该大屏设备的网络标识信息包括大屏设备的两个参数,这两个参数分别是:大屏设备的BT MAC地址,大屏设备的Wi-Fi MAC地址。该大屏设备的网络标识信息用于唯一标识该大屏设备。
可选的,在本申请实施例中,上述的第一消息和第二消息中分别可以携带大屏设备的IP地址,在这种情况下,智能手机可以获得大屏设备的IP地址。
或者,如果第一消息和第二消息中不携带大屏设备的IP地址,则大屏设备在回复第一消息和第二消息后,智能手机还可以向大屏设备发送广播报文来询问大屏设备的IP地址,从而获取到大屏设备的IP地址。
在智能手机同一次发现其他设备的过程中,由于智能手机是重复的发送上述的六个服务查询请求,因此,大屏设备也会重复的向智能手机回复信息,在智能手机下一次收到大屏设备的回复信息后,由于智能手机已经获取并且保存了智能手机的网络标识信息,在智能手机下一次接收到大屏设备利用不同的方式(例如BT、Wi-Fi、USB、NFC、Cellular中的一种或者多种方式)发送的一个或者多个消息后,如果该一个或者多个消息中均携带相同的随机值,智能手机根据接收到的一个或者多个中分别携带的相同的随机值,由于一个或者多个中分别携带的相同的随机值均相同,智能手机便可 以确定一个或者个消息均来自于同一个设备(例如称为第二设备),进一步的,根据一个或者多个消息分别携带的地址,例如为:BT MAC地址、Wi-Fi MAC地址、USB MAC地址、NFC MAC地址、IP地址中的多个,智能手机根据这些信息,结合之前存储的大屏设备的网络标识信息,将两者进行对比(例如通过向量计算数据的距离的方式),便可以确定第二设备和大屏设备为同一个设备,即进行设备的去重处理。利用设备的网络标识信息来进行设备的去重处理,设备的网络标识信息是可以变化的,可根据设备支持的能力的变化进行动态拓展与更新,因此设备的网络标识信息是可以动态拓展的,利用设备的网络标识信息来标识设备,可以有效的防止设备ID信息被追踪,提高设备的安全性。
或者,作为另一种可能的实现方式,在智能手机下一次接收到大屏设备利用不同的方式(例如BT、Wi-Fi、USB、NFC、Cellular中的一种或者多种方式)发送的一个或者多个消息后,如果该一个或者多个消息中均不携带随机值,智能手机可以根据该一个或者多个消息中分别携带的地址,例如为:BT MAC地址、Wi-Fi MAC地址、USB MAC地址、NFC MAC地址、IP地址中的一个或者多个,智能手机根据这些地址信息,结合之前存储的大屏设备的网络标识信息,将两者进行对比,也可以确定第二设备和大屏设备为同一个设备,即进行设备的去重处理。
应理解,在本申请实例中,在智能手机不同次的设备发现过程中,例如,智能手机每间隔5分钟做一次设备发现,前一次发现的设备与后一次发现的设备也需要做去重处理,将相同设备的广播内容识别为同一设备。其去重处理的方式和上述的过程一致,为了简介,此处不再赘述。
应理解,在本申请实施例中,由于在S302中,智能手机是通过广播方式,利用多种方式向周围的广播服务查询请求,因此,在S306中,智能手机除了可以收到大屏设备回复的消息之外,还可能收到其他设备回复的消息。在智能手机收到其他设备回复的消息后,也可以获取并存储其他设备对应的网络标识信息,用于唯一标识一个设备。智能手机利用该网络标识信息,在接收到该设备回复的多次消息后,可以进行设备的去重处理。
还应理解,在S306中,在智能手机接收到大屏设备利用BT方式回复的第一消息以及利用Wi-Fi方式回复的第二消息,并获取大屏设备的网络标识信息后,大屏设备识别出第一消息和第二消息均来自于大屏设备,因此,智能手机可以将第一消息和第二消息的内容进行合并和共享(例如大屏设备的设备信息、能力信息、分辨率、码率、解码率、传输数据包的大小等),从而避免了智能手机利用BT方式发现大屏设备,并且通过BT方式与大屏设备进行能力协商之后,在智能手机有基于Wi-Fi的业务时,智能手机还需要利用Wi-Fi的方式去发现大屏设备、并且与大屏设备进行能力协商的过程,减少了信令的交互,提高资源的利用率,提高了分布式业务的用户体验。
例如,在同一次发现设备的过程中,假设:智能手机同时收到大屏设备分别利用BT方式和Wi-Fi方式回复的信息时,由于利用BT方式发送的信息与利用Wi-Fi方式发送的信息携带数据量不一样,利用Wi-Fi方式发送的信息携带数据量大,利用BT方式发送的信息携带数据量小,在智能手机接收到大屏设备利用Wi-Fi方式发送的信息后,便可以将Wi-Fi方式发送的信息包括的内容进行过滤和去重处理,这样可以避免智能手机和大屏设备之间多次利用BT方式进行交互,从而节省信令的开销,提高资源的利用率。
又例如,在不同次的发现设备过程中:智能手机后一次发现的设备,与智能手机前一次发现的设备,如果通过网格标识进行匹配,经过匹配后为同一设备的话,智能手机后一次发现的设备可以共享智能手机之前发现的设备能力或者服务信息,智能手机只需要做一些设备能力或者服务信息同步即可,需要再完整同步设备能力与服务信息,从而节省信令的开销,提高资源的利用率。
在S306中,智能手机将通过多种无线和有线技术(能力)发现的设备信息进行去重处理,将去重处理后的剩余的多个不同设备的标识显示给用户,即向用户显示设备列表。例如,该显示界面可以如图8中的d所示的。
在S307中,用户可以根据需要,在多个设备列表中选择大屏设备,然后进行和大屏之间的连接。
应理解,在S307中,除了用户在该多个设备列表中手动选择需要连接的目标设备之外,智能手机还可以根据预设的条件,自动选择目标设备。例如,该预设的条件包括:自动连接与智能手机的距离小于某一个阈值的其他设备、自动连接具有预设的MAC地址的设备等。本申请实施例不作限制。
S308,在用户选择了大屏设备后,智能手机向大屏设备发送连接请求。在本申请实施例中,该连接请求包括:最优的一种或者多种连接方式(例如Wi-Fi、蓝牙等)对应的协议里定义的标准请求信息,例如,可以包括连接地址、连接窗口、安全要求等信息。
应理解,在S308中,智能手机会根据自身支持的能力以及对端设备(大屏设备)支持的能力,进一步的,还可以结合需要传输的业务信息,在BT、Wi-Fi、NFC、USB、Zigbee、移动网络这几种方式中选择一种或者多种最优的方式与大屏设备进行连接。
可选的,作为一种可能的实现方式,在S308中,可以预定义连接策略,例如:在智能手机和大屏设备均支持USB、Wi-Fi(5GHz)、Wi-Fi P2P(5GHz)、Wi-Fi(2.4GHz)、Wi-Fi P2P(2.4GHz)、BR/EDR、BLE等能力的情况下,针对大带宽的业务,在近场传输时,按照优先级从高到低的顺序将不同能力进行排序,其顺序为:USB>Wi-Fi(5GHz)>Wi-Fi P2P(5GHz)>Wi-Fi(2.4GHz)>Wi-Fi P2P(2.4GHz)>BR/EDR>BLE。远场传输时,按照优先级从高到低的顺序将不同能力(即技术)进行排序,其顺序为:以太网(Ethernet)>Wi-Fi>Cellular。在智能手机和大屏设备进行连接时,智能手机可以按上述的不同能力的优先级,在智能手机和大屏设备均支持的能力中,选择优先级最高的方式与大屏设备进行连接。或者,选择优先较高的前几种方式均与大屏设备进行连接。
在本申请实例中,随着智能手机和大屏设备之间进行的多次业务传输的连接,智能手机可以监听多次连接的过程中每次连接过程中的通信时延、每次连接过程的带宽的信息等,动态的调整后续与大屏设备之间建立连接的方式,以及动态的调整各个不同能力优先级顺序。
在S309中,大屏设备接收到智能手机发送的连接请求后,根据连接请求携带的信息,确定连接请求携带的连接方式(例如为BT、Wi-Fi、USB、NFC、Cellular中的任意一种),根据连接方式,大屏设备和智能手机之间建立通信连接。
可选的,在S309中,作为一种可能的实现方式,假设:智能手机支持蓝牙通信能 力,智能手机上“蓝牙”处于打开状态。大屏设备也支持蓝牙通信能力,但是大屏设备上“蓝牙”处于关闭状态。而且,智能手机已经明确获知大屏设备支持蓝牙通信能力,或者,智能手机不确定大屏设备是否支持蓝牙通信能力的情况下,用户希望利用蓝牙的方式将智能手机与大屏设备建立连接。在这种情况下,大屏设备接收到的连接请求中携带蓝牙连接的需要的连接地址、连接窗口、安全要求等信息。大屏设备根据该连接请求,首先自动将“蓝牙”打开,或者,大屏设备会提示用户将大屏设备的“蓝牙”打开,在“蓝牙”打开之后,智能手机便可以和大屏设备之间建立蓝牙连接。如果大屏设备不支持蓝牙通信能力,或者,大屏设备虽然支持蓝牙通信能力,但是暂时不允许打开“蓝牙”,则大屏设备可以向用户提示:大屏设备暂时不支持蓝牙连接。可选的,大屏设备不会响应智能手机发送的连接请求。或者,大屏设备还可以向智能手机回复信息,用于向智能手机通知大屏设备暂时不支持蓝牙连接,在这种情况下,智能手机不能和大屏设备之间建立蓝牙连接,但是智能手机和大屏设备之间可以建立基于其他方式(例如Wi-Fi)的连接。
可选的,在S309中,作为另一种可能的实现方式,如果大屏设备支持蓝牙通信能力,并且大屏设备上“蓝牙”已经处于打开状态。智能手机也支持蓝牙通信能力,但是智能手机上“蓝牙”处于关闭状态,而用户希望利用蓝牙的方式将智能手机与大屏设备建立连接。在这种情况下,智能手机会提示用户将智能手机的“蓝牙”打开,在智能手机的“蓝牙”打开之后,智能手机向大屏设备发送的连接请求中,会携带蓝牙连接的需要的连接地址、连接窗口、安全要求等信息。在这种情况下,智能手机可以和大屏设备之间建立蓝牙连接。如果智能手机上“蓝牙”处于关闭状态,而且,智能手机上“蓝牙”暂时不能开启,而用户希望利用蓝牙的方式将智能手机与大屏设备建立连接。在这种情况下,智能手机会提示用户:智能手机暂时不支持蓝牙连接。智能手机向大屏设备发送的连接请求中,不会携带蓝牙连接的需要的连接地址、连接窗口、安全要求等信息。在这种情况下,智能手机不能和大屏设备之间建立蓝牙连接,但是智能手机和大屏设备之间可以建立基于其他方式(例如Wi-Fi)的连接。
可选的,在S309中,作为另一种可能的实现方式,假设:用户使用智能手机,正在利用Wi-Fi的方式向其他设备传输视频文件,则智能手机会结合智能手机目前支持的所有通信技术的使用情况,在除Wi-Fi通信方式之外的通信技术中(例如蓝牙等)选择一种或者多种通信技术与大屏设备建立连接,则智能手机向大屏设备发送的连接请求中,不会携带Wi-Fi连接的需要的连接地址、连接窗口、安全要求等信息。在这种情况下,智能手机不能和大屏设备之间建立Wi-Fi连接,但是智能手机和大屏设备之间可以建立基于其他方式(例如蓝牙)的连接。
可选的,在S309中,作为又一种可能的实现方式,假设:用户使用大屏设备,正在利用Wi-Fi的方式向另一个电子设备传输文件,则大屏设备会结合大屏设备目前支持的所有通信技术的使用情况,根据智能手机发送的连接请求,在除Wi-Fi通信方式之外的通信技术中选择一种或者多种通信技术(例如蓝牙等)与大屏设备建立通信连接。可选的,大屏设备还可以向智能手机回复信息,用于向智能手机通知大屏设备暂时不支持Wi-Fi连接,在这种情况下,即使智能手机向大屏设备发送的连接请求中携带Wi-Fi连接的需要的连接地址、连接窗口、安全要求等信息,智能手机也不能和大 屏设备之间建立Wi-Fi连接,但是智能手机和大屏设备之间可以建立基于其他方式(例如蓝牙)的连接。
应理解,在本申请实施例中,智能手机和大屏设备之间可以同时建立并存在多种不同技术的连接。例如,智能手机和大屏设备之间可以同时存在BT连接和Wi-Fi连接。
在S310中,在大屏设备和智能手机之间建立通信连接后,智能手机便可以向大屏设备传输业务的数据流,两者之间开始数据通信。
应理解,在本申请实施例中,在智能手机和大屏设备之间同时存在多种连接的情况下,智能手机可以选择其中最优的一种,或者同时选择其中的多种同时向大屏设备传输数据。
本申请提供的发现和连接电子设备的方法,利用同一个电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时主动去广播或者发送报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。并且,采用设备的网络标识来标识一个设备,可以避免当前业界通常采取的唯一设备ID标识设备时容易被追踪的问题,可以有效的防止设备ID信息被追踪,提高设备的安全性,同时满足当设备能力是动态变化时,网络标识随之动态的变化。进一步的,采用设备的网络标识进行设备去重,从而过滤掉重复的信息,可以使得多种发现连接技术并行进行使用,提高设备发现的效率。并且,在进行设备连接时,可以获取对端设备的支持的能力,从而可以根据业务、按场景选择最优化的连接技术与连接能力进行连接,提高用户的体验。
图10所示的为在图2所示的场景中,本申请提供的一例发现和连接电子设备的方法400的示意性流程图。在图2所示的场景中,假设:用户使用的智能手机210具有BT、Wi-Fi、NFC、USB、Cellular等能力,其中,Wi-Fi可以包括频率为2.4GHz和5GHz两种,分别用Wi-Fi(2.4GHz)和Wi-Fi(5GHz)表示。车载设备220支持:BT、Wi-Fi、USB等能力中的多种。智能手机210可以通过BT、Wi-Fi、NFC、USB、Cellular等多种能力同时去监听周边设备广播的报文。车机具有BT、Wi-Fi、USB能力,车载设备220可以通过BT、Wi-Fi、USB的广播能力让智能手机210去发现车载设备220的存在,从而完成智能手机210与车载设备220的连接和数据通信。智能手机210利用被动发现方式发现车载设备220。假设智能手机210和车载设备220已经利用USB进行了连接。智能手机可以理解为发现端设备,大屏设备可以理解为被发现端设备或者扫描端设备。如图10所示的,该方法400包括:S401至S408。
S401,智能手机订阅或者监听车载设备发布的服务或者能力信息。
S402,车载设备主动发送广播其本身设备或者服务信息。具体的,车载设备可以利用自己具有的所有能力(BT、Wi-Fi、NFC、USB等),或者具有的所有能力中的多种能力同时广播或者发送报文。利用不同方式广播或者发送的报文中携带车载设备具有的能力信息,进一步的,还可以携带车载设备具有的服务信息(例如包括:车载设备名称、车载设备的设备类型、车载设备支持文件分享、投屏等服务)。
假设车载设备利用BT、Wi-Fi、NFC、USB同时广播或者发送报文。
利用BT方式广播的第一报文中携带:Wi-Fi能力指示信息、NFC能力指示信息、 USB能力指示信息。其中,Wi-Fi能力指示信息用于指示车载设备还利用了Wi-Fi方式广播了报文,NFC能力指示信息用于指示车载设备还利用了NFC方式广播了报文,USB能力指示信息用于指示车载设备还利用了USB方式发送了报文。
可选的,第一报文还包括:BT能力指示信息,BT能力指示信息用于指示车载设备还利用了BT方式广播了报文。
类似的,利用Wi-Fi、NFC和USB方式分别发送或者广播的报文中,分别携带用于指示该车载设备还利用了其它方式同时广播或者发送了报文。
也就是说,利用不同方式广播的报文中,分别携带了:用于指示该车载设备同时利用了其具有的其他所有能力同时广播或者发送报文的指示信息。
可选的,在本申请实施例中,作为另一种可能的实现方式,BT能力指示信息还可以用于指示车载设备还具有BT通信能力,Wi-Fi能力指示信息还可以用于指示车载设备还具有Wi-Fi通信能力,NFC能力指示信息还可以用于指示车载设备还具有NFC通信能力。USB能力指示信息还可以用于指示车载设备还具有USB通信能力。换句话说,各种能力指示信息还可以用于指示车载设备具有某种通信能力,而并不意味着车载设备利用该通信能力发送或者广播了报文。
可选的,在本申请实施例中,除了在上述的四个报文中分别携带其他能力指示信息的方式,向车载设备通知智能手机还利用了其他能力向车载设备广播或者发送服务查询请求之外,还可以通过其他可选的方式。其具体方案和方法300中的类似,对应的描述可以参考方法300中的S302中的相关的描述,为了简洁,这里不再赘述。
在本申请实施例中,上述的四个报文中还分别携带一个随机值(也可以称为随机码),六个服务查询请求分别携带的随机值均相同,该随机值由车载设备生成,用于唯一标识车载设备,即随机值用于唯一标识一个设备。
应理解,在本申请实施例中,车载设备通过自己具有的所有能力(BT、Wi-Fi、NFC、USB、Zigbee、Cellular等)同时广播报文时,由于不同的能力或者技术均有各种对应的协议规定,利用多个不同技术广播报文时可能存在信道、空口时序上等的冲突问题,即不同技术广播的报文之间可能会存在干扰,因此,在车载设备利用BT、Wi-Fi、NFC、USB、Zigbee、Cellular等方式广播报文时,可以采用方法300中所描述的冲突避让机制。其具体方案和方法300中的类似,对应的描述可以参考方法300中的S302中的相关的描述,为了简洁,这里不再赘述。
应理解,在本申请实施例中,上述的四个报文可以是多次发送的,例如,在第一时刻发送上述的四个报文,在第一时刻后的某个时刻,车载设备可以重复的发送上述的四个报文或者上述的四个报文中的任意多个。可选的,车载设备可以周期性的发送上述的四个报文。
S403中,智能手机会根据自身的条件,在BT、Wi-Fi、USB、NFC、Cellular中选择一种或者多种技术进行监听周边设备广播的报文。例如,智能手机可以根据自己支持的能力、时延要求以及功耗等选择,在自己支持的能力中(在BT、Wi-Fi、USB、NFC、Cellular中)选择一种或者几种能力进行监听。S403的具体过程可以参考方法300中S303描述,区别在于S303为大屏设备进行监听,而S403为智能手机进行监听,除此之外,其它具体的过程均为相同的,这里不再赘述。
S404,在智能手机监听到车载设备广播的四个报文中的全部报文或者部分报文后,假设:智能手机监听到了第一报文、第二报文、第三报文、第四报文。智能手机根据第一报文,确定车载设备的BT能力对应的MAC地址,下文简称为BT MAC地址。根据第二报文,确定车载设备的Wi-Fi能力对应的MAC地址,下文简称为Wi-Fi MAC地址。根据第三报文,确定智能手机的NFC能力对应的MAC地址,下文简称为NFC MAC地址。根据第四报文,确定车载设备的USB能力对应的MAC地址,下文简称为USB MAC地址。并且,智能手机根据第一报文、第二报文、第三报文、第四报文分别携带的随机值,确定第一报文、第二报文、第三报文、第四报文均来自于同一个设备。智能手机可以根据这些信息,获取车载设备的网络标识信息,该网络标识信息包括:BT MAC、Wi-Fi MAC、USB MAC、NFC MAC,即该网络标识信息包括车载设备的四个参数,这四个参数分别是:车载设备的BT MAC地址,车载设备的Wi-Fi MAC地址,车载设备的USB MAC地址,车载设备的NFC MAC地址。该网络标识信息用于唯一标识该车载设备。
可选的,在本申请实施例中,作为另外一种可能的实现方式,上述的第一报文至第四报文中分别还可以携带车载设备的IP地址,在这种情况下,智能手机也可以获得车载设备的IP地址,从而获取车载设备的网络标识信息,该网络标识信息包括:BT MAC、Wi-Fi MAC、USB MAC、NFC MAC、IP地址,即该网络标识信息包括车载设备的五个参数,这五个参数分别是:车载设备的BT MAC地址,车载设备的Wi-Fi MAC地址,车载设备的USB MAC地址,车载设备的NFC MAC地址、车载设备的IP地址。
或者,如果第一报文至第四报文不携带车载设备的IP地址,则在智能手机接收到该第一报文至第四报文后,智能手机还可以向车载设备发送广播报文来询问车载设备的IP地址,从而获取到车载设备的IP地址。
进一步的,智能手机可以利用车载的设备的网络标识信息,进行设备的去重处理,以及进行不同技术之间的信息的共享,具体过程可以参考方法300中对于S304中的描述,区别在于:S304为大屏设备进行去重处理,而S404为智能手机进行去重处理,除此之外,其它具体的过程均为相同的,这里不再赘述。
在S404,智能手机将通过多种无线和有线技术(能力)发现的设备信息进行去重处理,将去重处理后的剩余的多个不同设备的标识显示给用户,即向用户显示设备列表。例如,该显示界面可以如图8中的d所示的。
在S405中,用户可以根据需要,在多个设备列表中选择车载设备,然后进行和车载设备之间的连接。
应理解,在S405中,除了用户在该多个设备列表中手动选择需要连接的目标设备之外,智能手机还可以根据预设的条件,自动选择目标设备。例如,该预设的条件包括:自动连接与智能手机的距离小于某一个阈值的其他设备、自动连接具有预设的MAC地址的设备等。本申请实施例不作限制。
在S406中,在用户选择了车载设备后,智能手机向车载设备发送连接请求。该连接请求包括:最优的一种或者多种连接方式(例如Wi-Fi、蓝牙等)对应的协议里定义的标准请求信息,例如,可以包括连接地址、连接窗口、安全要求等信息。
应理解,在S406中,智能手机会根据自身支持的能力以及对端设备(车载设备) 支持的能力,进一步的,还可以结合需要传输的业务信息,在BT、Wi-Fi、NFC、USB、Zigbee、移动网络这几种方式中选择一种最优的方式或者多种方式均与大屏设备进行连接。具体过程可以参考方法300中对于S308中的描述,这里不再赘述。
在S407中,车载设备接收到智能手机发送的连接请求后,根据连接请求携带的信息,确定连接请求携带的连接方式(例如为BT、Wi-Fi、USB、NFC中的任意一种或者多种),根据连接方式,车载设备和智能手机之间建立通信连接。
应理解,在本申请实施例中,智能手机和车载设备之间可以建立多种不同技术的连接。例如,智能手机和车载设备之间可以同时建立BT连接和Wi-Fi连接。
在S408中,在车载设备和智能手机之间建立通信连接后,用户便可以通过智能手机向车载设备发送数据。
应理解,在本申请实施例中,在智能手机和车载设备之间同时存在多种连接的情况下,智能手机可以选择其中最优的一种,或者同时选择其中的多种同时向车载设备传输数据。
本申请提供的发现和连接电子设备的方法,利用电子设备具有的所有发现设备的技术(能力)或者所有发现设备的技术(能力)中的多种同时主动去监听周边设备广播的报文,并且,周边设备利用其具有的所有发现设备的技术(能力)或者其具有的所有发现设备的技术(能力)中的多种同时主动去广播报文,满足在异构网络条件下,业务服务对具有多种不同技术能力的设备的发现连接能力的要求,提高用户体验。并且,采用设备的网络标识来标识一个设备,可以避免当前业界通常采取的唯一设备ID标识设备时容易被追踪的问题,可以有效的防止设备ID信息被追踪,提高设备的安全性,同时满足当设备能力是动态变化时,网络标识随之动态的变化。进一步的,采用设备的网络标识进行设备去重,从而过滤掉重复的信息,可以使得多种发现连接技术并行进行使用,提高设备发现的效率。并且,在进行设备连接时,可以获取对端设备的支持的能力,从而可以根据业务、按场景选择最优化的连接技术与连接能力进行连接,提高用户的体验。
应理解,上述只是为了帮助本领域技术人员更好地理解本申请实施例,而非要限制本申请实施例的范围。本领域技术人员根据所给出的上述示例,显然可以进行各种等价的修改或变化,例如,上述方法300和方法400中某些步骤可以不必须的,或者可以新加入某些步骤等。或者上述任意两种或者任意多种实施例的组合。这样的修改、变化或者组合后的方案也落入本申请实施例的范围内。
还应理解,本申请实施例中的方式、情况、类别以及实施例的划分仅是为了描述的方便,不应构成特别的限定,各种方式、类别、情况以及实施例中的特征在不矛盾的情况下可以相结合。
还应理解,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解,上文对本申请实施例的描述着重于强调各个实施例之间的不同之处,未提到的相同或相似之处可以互相参考,为了简洁,这里不再赘述。
上述结合图1-图10描述了本申请实施例提供的发现和连接电子设备的方法的实施例,下面描述本申请实施例提供的电子设备。
本实施例可以根据上述方法,对电子设备(包括上述的第一电子设备、第二电子设备、)进行功能模块的划分。例如,可以对应各个功能,划分为各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
需要说明的是,上述方法实施例涉及的各步骤的相关内容,均可以援引到对应功能模块的功能描述,此处不再赘述。
本申请实施例提供的电子设备,用于执行上述方法实施例提供任一种发现和连接电子设备的方法,因此可以达到与上述实现方法相同的效果。在采用集成的单元的情况下,电子设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理。例如,可以用于支持电子设备执行处理单元执行的步骤。存储模块可以用于支持存储程序代码和数据等。通信模块,可以用于支持电子设备与其他设备的通信。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。
示例性地,图11示出了本申请提供的一例电子设备500的硬件结构示意图。该电子设备500可以为上述的方法实施例中的智能手机、大屏设备或者车载设备。如图11所示,电子设备500可包括处理器510,外部存储器接口520,内部存储器521,通用串行总线(universal serial bus,USB)接口530,充电管理模块540,电源管理模块541,电池542,天线1,天线2,无线通信模块550等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备500的具体限定。在本申请另一些实施例中,电子设备500可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器510可以包括一个或多个处理单元。例如:处理器510可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备500也可以包括一个或多个处理器510。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
在一些实施例中,处理器510可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口,集成电路间音频(integrated circuit sound,I2S)接口, 脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM卡接口,和/或USB接口等。其中,USB接口530是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口530可以用于连接充电器为电子设备500充电,也可以用于电子设备500与外围设备之间传输数据。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备500的结构限定。在本申请另一些实施例中,电子设备500也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备500的无线通信功能可以通过天线1,天线2以及无线通信模块550等实现。
无线通信模块550可以提供应用在电子设备500上的包括Wi-Fi(包括Wi-Fi感知和Wi-Fi AP),蓝牙(bluetooth,BT),NFC,USB,Zigbee,移动网络,无线数传模块(例如,433MHz,868MHz,515MHz)等无线通信的解决方案。无线通信模块550可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块550经由天线1或者天线2(或者,天线1和天线2)接收电磁波,将电磁波信号滤波以及调频处理,将处理后的信号发送到处理器510。无线通信模块550还可以从处理器510接收待发送的信号,对其进行调频,放大,经天线1或者天线2转为电磁波辐射出去。
外部存储器接口520可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备500的存储能力。外部存储卡通过外部存储器接口520与处理器510通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器521可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器510可以通过运行存储在内部存储器521的上述指令,从而使得电子设备500执行本申请一些实施例中所提供的发现和连接电子设备的方法,以及各种应用以及数据处理等。内部存储器521可以包括代码存储区和数据存储区。其中,代码存储区可存储操作系统。数据存储区可存储电子设备500使用过程中所创建的数据等。此外,内部存储器521可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器510可以通过运行存储在内部存储器521的指令,和/或存储在设置于处理器510中的存储器的指令,来使得电子设备500执行本申请实施例中所提供任一种发现和连接电子设备的方法,以及其他应用及数据处理。
电子设备500包括但不限于智能电视、大屏设备、手机、平板电脑、笔记本、大屏电视、智能家居单品、PDA、POS、车载电脑等。本申请实施例在此不作限制。
应理解,电子设备500执行上述相应步骤的具体过程请参照前文中结合图6、图10所示的各个实施例中描述的智能手机、大屏设备或者车载设备执行步骤的相关描述,为了简洁,这里不加赘述。
还应理解,以上装置中单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。例如,各个单元 可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。这里该处理元件又可以称为处理器,可以是一种具有信号处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。在一个例子中,以上任一装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个专用集成电路(application specific integrated circuit,ASIC),或,一个或多个数字信号处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA),或这些集成电路形式中至少两种的组合。再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
本申请实施例还提供了一种发现和连接电子设备的方法的系统,该系统包括:上述方法实施例中提供的第一电子设备(例如为智能手机)、第二电子设备(例如为大屏设备或者车载设备)。
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序代码,该计算机程序包括用于执行上述本申请实施例提供的任意一种发现和连接电子设备的方法的指令。该可读介质可以是只读存储器(read-only memory,ROM)或随机存取存储器(random access memory,RAM),本申请实施例对此不做限制。
本申请还提供了一种计算机程序产品,该计算机程序产品包括指令,当该指令被执行时,以使得第一电子设备、第二电子设备执行对应于上述方法300和方法400中的对应的操作。
本申请实施例还提供了一种位于通信装置中的芯片,该芯片包括:处理单元和通信单元,该处理单元,例如可以是处理器,该通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行计算机指令,以使所述通信装置执行上述本申请实施例提供的任一种发现和连接电子设备的方法。
可选地,该计算机指令被存储在存储单元中。
可选地,该存储单元为该芯片内的存储单元,如寄存器、缓存等,该存储单元还可以是该终端内的位于该芯片外部的存储单元,如ROM或可存储静态信息和指令的其他类型的静态存储设备,随机RAM等。其中,上述任一处提到的处理器,可以是一个CPU,微处理器,ASIC,或一个或多个用于控制上述的反馈信息的传输方法的程序执行的集成电路。该处理单元和该存储单元可以解耦,分别设置在不同的物理设备上,通过有线或者无线的方式连接来实现该处理单元和该存储单元的各自的功能,以支持该系统芯片实现上述实施例中的各种功能。或者,该处理单元和该存储器也可以耦合在同一个设备上。
其中,本实施例提供的通信装置、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或 可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是ROM、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是RAM,其用作外部高速缓存。RAM有多种不同的类型,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
在本申请中可能出现的对各种消息/信息/设备/网元/系统/装置/动作/操作/流程/概念等各类客体进行了赋名,可以理解的是,这些具体的名称并不构成对相关客体的限定,所赋名称可随着场景,语境或者使用习惯等因素而变更,对本申请中技术术语的技术含义的理解,应主要从其在技术方案中所体现/执行的功能和技术效果来确定。
在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,不同的实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请的实施例中的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序或指令。在计算机上加载和执行所述计算机程序或指令时,全部或部分地执行本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机程序或指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是集成一个或多个可用介质的服务器等数据存储设备。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到 多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的可读存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (28)

  1. 一种发现和连接电子设备的方法,其特征在于,所述方法包括:
    第一电子设备在第一时间段内,利用第一通信技术广播第一报文,所述第一报文用于查询其它设备具有的通信技术能力;
    所述第一电子设备在第二时间段内,利用第二通信技术广播第二报文,所述第二报文用于查询其它设备具有的通信技术能力,所述第一时间段和所述第二时间段有重叠;
    所述第一电子设备接收第二电子设备发送的响应信息;
    所述第一电子设备根据所述响应信息,确定所述第二电子设备支持的通信技术能力;
    所述第一电子设备根据所述第二电子设备支持的通信技术能力,与所述第二电子设备之间建立通信连接。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一电子设备在第三时间段内,利用第三通信技术广播第三报文,所述第三报文用于查询其它设备具有的通信技术能力;
    其中,所述第三通信技术和所述第一通信技术存在冲突,所述第一时间段和所述第三时间段没有重叠,所述第二时间段和所述第三时间段有重叠。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一报文包括:用于指示所述第一电子设备具有的通信技术能力或者指示所述第一电子设备广播报文所使用的通信技术的指示信息。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述第一报文和所述第二报文均包括所述第一电子设备的第一随机码。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述响应信息包括:所述第二电子设备的第二随机码、以及用于指示所述第二电子设备具有的通信技术能力的指示信息。
  6. 根据权利要求5所述的方法,其特征在于,在所述第一电子设备根据所述第二电子设备支持的通信技术能力,与所述第二电子设备之间建立通信连接之前,所述方法还包括:
    所述第一电子设备根据所述第二随机码,确定所述响应信息来自于所述第二电子设备;
    所述第一电子设备根据所述响应信息,获取所述第二电子设备的网络标识信息,所述第二电子设备的网络标识信息包括:所述第二电子设备的MAC地址或者IP地址。
  7. 根据权利要求6所述的方法,其特征在于,在所述第一电子设备接收所述第二电子设备发送的响应信息之后,所述方法还包括:
    所述第一电子设备接收所述第二电子设备发送的第一信息,所述第一信息包括所述第二电子设备的网络标识;
    所述第一电子设备根据所述第二电子设备的网络标识信息,以及所述第一信息携带的所述第二电子设备的网络标识,确定所述第一信息来自于所述第二电子设备。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述第一电子设备根 据所述第二电子设备支持的通信技术能力,与所述第二电子设备之间建立通信连接,包括:
    所述第一电子设备根据所述第二电子设备支持的通信技术能力,确定所述第一电子设备和所述第二电子设备均支持的通信技术能力集合;
    所述第一电子设备在所述通信技术能力集合中,根据待传输业务,向所述第二电子设备发送连接请求,所述连接请求包括一种或者多种通信技术分别对应连接信息;
    所述第一电子设备利用所述一种或者多种通信技术与所述第二电子设备建立通信连接。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    所述第一电子设备通过已经建立通信连接的一种或者多种通信技术,向所述第二电子设备发送所述待传输业务的数据。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述第一通信技术或者所述第二通信技术为:蓝牙、Wi-Fi、NFC、USB、紫蜂或者蜂窝网络,所述第一通信技术和所述第二通信技术不同。
  11. 一种发现和连接电子设备的方法,其特征在于,所述方法包括:
    第一电子设备在第一时间窗内,利用第一通信技术广播第一报文,所述第一报文用于查询其它设备具有的通信技术能力;
    所述第一电子设备在所述第一时间窗内,利用第二通信技术广播第二报文,所述第二报文用于查询其它设备具有的通信技术能力;
    所述第一电子设备接收第二电子设备发送的响应信息;
    所述第一电子设备根据所述响应信息,确定所述第二电子设备支持的通信技术能力;
    所述第一电子设备根据所述第二电子设备支持的通信技术能力,与所述第二电子设备之间建立通信连接。
  12. 根据权利要求11所述的方法,其特征在于,所述方法还包括:
    所述第一电子设备在所述第一时间窗内,利用第三通信技术广播第三报文,所述第三报文用于查询其它设备具有的通信技术能力;其中,所述第三通信技术和所述第一通信技术存在冲突。
  13. 根据权利要求11或12所述的方法,其特征在于,所述响应信息包括:所述第二电子设备的第二随机码、以及用于指示所述第二电子设备具有的通信技术能力的指示信息;
    所述第一电子设备根据所述第二随机码,确定所述响应信息来自于所述第二电子设备;
    所述第一电子设备根据所述响应信息,获取所述第二电子设备的网络标识信息,所述第二电子设备的网络标识信息包括:所述第二电子设备的MAC地址或者IP地址。
  14. 一种发现和连接电子设备的方法,其特征在于,所述方法包括:
    第二电子设备在第一时间段内,接收第一电子设备利用第一通信技术广播的第一报文,所述第一报文用于查询其它设备具有的通信技术能力;
    所述第二电子设备在第二时间段内,接收所述第一电子设备利用第二通信技术广 播的第二报文,所述第二报文用于查询其它设备具有的通信技术能力,所述第一时间段和所述第二时间段有重叠;
    所述第二电子设备根据所述第一报文和所述第二报文,向所述第一电子设备发送响应信息;
    所述第二电子接收所述第一电子设备发送的连接请求;
    所述第二电子设备根据所述连接请求,与所述第一电子设备之间建立通信连接。
  15. 根据权利要求14所述的方法,其特征在于,所述方法还包括:
    所述第二电子设备在第三时间段内,接收所述第一电子设备利用第三通信技术广播的第三报文,所述第三报文用于查询其它设备具有的通信技术能力;
    其中,所述第三通信技术和所述第一通信技术存在冲突,所述第一时间段和所述第三时间段没有重叠,所述第二时间段和所述第三时间段有重叠。
  16. 根据权利要求14或15所述的方法,其特征在于,所述第一报文包括:用于指示所述第一电子设备具有的通信技术能力或者指示所述第一电子设备广播报文所使用的通信技术的指示信息。
  17. 根据权利要求14至16中任一项所述的方法,其特征在于,所述第一报文和所述第二报文均包括所述第一电子设备的第一随机码。
  18. 根据权利要求17所述的方法,其特征在于,在所述第二电子设备根据所述连接请求,与所述第一电子设备之间建立通信连接之前,所述方法还包括:
    所述第二电子设备根据所述第一随机码,确定所述第一报文和所述第二报文均来自于所述第一电子设备;
    所述第二电子设备根据所述第一报文和所述第二报文,获取所述第一电子设备的网络标识信息,所述第一电子设备的网络标识信息包括:所述第一电子设备的MAC地址或者IP地址。
  19. 根据权利要求18所述的方法,其特征在于,在所述第二电子设备接收所述第一报文和所述第二报文之后,所述方法还包括:
    所述第二电子设备接收所述第一电子设备发送的第二信息,所述第二信息包括所述第一电子设备的网络标识;
    所述第二电子设备根据所述第一电子设备的网络标识信息,以及所述第二信息携带的所述第一电子设备的网络标识,确定所述第二信息来自于所述第一电子设备。
  20. 根据权利要求14至19中任一项所述的方法,其特征在于,所述响应信息包括:所述第二电子设备的第二随机码、以及用于指示所述第二电子设备具有的通信技术能力的指示信息。
  21. 根据权利要求20所述的方法,其特征在于,所述方法还包括:
    所述第二电子设备通过已经建立通信连接的一种或者多种通信技术,接收所述第一电子设备发送待传输业务的数据。
  22. 根据权利要求14至21中任一项所述的方法,其特征在于,所述第一通信技术或者所述第二通信技术为:蓝牙、Wi-Fi、NFC、USB、紫蜂或者蜂窝网络,所述第一通信技术和所述第二通信技术不同。
  23. 一种发现和连接电子设备的方法,其特征在于,所述方法包括:
    第二电子设备在第一时间窗内,接收第一电子设备利用第一通信技术广播的第一报文,所述第一报文用于查询其它设备具有的通信技术能力;
    所述第二电子设备在所述第一时间窗内,接收所述第一电子设备利用第二通信技术广播的第二报文;
    所述第二电子设备根据所述第一报文和所述第二报文,向所述第一电子设备发送响应信息;
    所述第二电子接收所述第一电子设备发送的连接请求;
    所述第二电子设备根据所述连接请求,与所述第一电子设备之间建立通信连接。
  24. 根据权利要求23所述的方法,其特征在于,所述方法还包括:
    所述第二电子设备在所述第一时间窗内,接收所述第一电子设备利用第三通信技术广播的第三报文,所述第三报文用于查询其它设备具有的通信技术能力;其中,所述第三通信技术和所述第一通信技术存在冲突。
  25. 根据权利要求23或24所述的方法,其特征在于,所述第一报文和所述第二报文均包括所述第一电子设备的第一随机码。
  26. 一种电子设备,其特征在于,包括:处理器及存储器;所述处理器和存储器耦合,所述存储器存储有程序指令,当所述存储器存储的程序指令被所述处理器执行时执行如权利要求1至13中任一项所述的方法,或者执行如权利要求14至25中任一项所述的方法。
  27. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储了计算机程序,所述计算机程序包括程序指令,所述程序指令当被处理器执行时使所述处理器执行如权利要求1至13中任一项所述的方法,或者执行如权利要求14至25中任一项所述的方法。
  28. 一种芯片,其特征在于,包括:处理器,用于从存储器中调用并运行计算机程序,使得安装有所述芯片的通信设备执行如权利要求1至13中任一项所述的方法,或者执行如权利要求14至25中任一项所述的方法。
PCT/CN2022/083364 2021-03-31 2022-03-28 发现和连接电子设备的方法以及电子设备 WO2022206672A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22778854.4A EP4287711A1 (en) 2021-03-31 2022-03-28 Method for discovering and connecting electronic device, and electronic device
US18/474,719 US20240022892A1 (en) 2021-03-31 2023-09-26 Method for Discovering and Connecting to Electronic Device and Electronic Device

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110351238.9 2021-03-31
CN202110351238 2021-03-31
CN202110821297.8A CN115150789A (zh) 2021-03-31 2021-07-20 发现和连接电子设备的方法以及电子设备
CN202110821297.8 2021-07-20

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/474,719 Continuation US20240022892A1 (en) 2021-03-31 2023-09-26 Method for Discovering and Connecting to Electronic Device and Electronic Device

Publications (1)

Publication Number Publication Date
WO2022206672A1 true WO2022206672A1 (zh) 2022-10-06

Family

ID=83405040

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083364 WO2022206672A1 (zh) 2021-03-31 2022-03-28 发现和连接电子设备的方法以及电子设备

Country Status (4)

Country Link
US (1) US20240022892A1 (zh)
EP (1) EP4287711A1 (zh)
CN (1) CN115150789A (zh)
WO (1) WO2022206672A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150208311A1 (en) * 2012-07-26 2015-07-23 Lg Electronics Inc. Method of supporting communication using two or more radio access technologies and apparatus for same
CN105191172A (zh) * 2013-05-16 2015-12-23 三星电子株式会社 通信方法和装置
WO2016081734A2 (en) * 2014-11-19 2016-05-26 Qualcomm Incorporated Techniques to support heterogeneous network data path discovery
US20170171852A1 (en) * 2015-12-10 2017-06-15 Samsung Electronics Co., Ltd. Method and apparatus for managing capability of electronic device in wireless communication system
CN107925860A (zh) * 2015-08-05 2018-04-17 高通股份有限公司 用于连接能力交换的方法
WO2018120390A1 (zh) * 2016-12-28 2018-07-05 华为技术有限公司 一种通信建立的方法及终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150208311A1 (en) * 2012-07-26 2015-07-23 Lg Electronics Inc. Method of supporting communication using two or more radio access technologies and apparatus for same
CN105191172A (zh) * 2013-05-16 2015-12-23 三星电子株式会社 通信方法和装置
WO2016081734A2 (en) * 2014-11-19 2016-05-26 Qualcomm Incorporated Techniques to support heterogeneous network data path discovery
CN107925860A (zh) * 2015-08-05 2018-04-17 高通股份有限公司 用于连接能力交换的方法
US20170171852A1 (en) * 2015-12-10 2017-06-15 Samsung Electronics Co., Ltd. Method and apparatus for managing capability of electronic device in wireless communication system
WO2018120390A1 (zh) * 2016-12-28 2018-07-05 华为技术有限公司 一种通信建立的方法及终端

Also Published As

Publication number Publication date
CN115150789A (zh) 2022-10-04
US20240022892A1 (en) 2024-01-18
EP4287711A1 (en) 2023-12-06

Similar Documents

Publication Publication Date Title
US11395213B2 (en) Systems and methods for implementing multiple band service discovery
EP2484173B1 (en) Wlan peer-to-peer group owner negotiation
EP2645811B1 (en) Communication device
AU2014260672B2 (en) Method and apparatus for performing wireless docking service
US20160157193A1 (en) Exchanging ranging and location information among peer-to-peer devices
US20070149123A1 (en) Multiple radio usage in a wireless communications device
WO2013117124A1 (zh) 一种d2d通信中的资源协商方法及设备
US20190150062A1 (en) Bluetooth Trigger for NAN
KR101692661B1 (ko) 슬롯 기반의 d2d 통신 방법 및 장치
US20200205058A1 (en) Communication apparatus, control method therefor, and non-transitory computer-readable storage medium
JP2016187090A (ja) 通信機器
WO2022135187A1 (zh) Wi-Fi直连下数据传输的方法和电子设备
US10194477B2 (en) Method and apparatus for controlling a device using bluetooth technology
US11575768B2 (en) Communication apparatus capable of notifying a client apparatus, control method thereof, and medium
US11367449B2 (en) Method and apparatus for calling voice recognition service by using Bluetooth low energy technology
WO2022206672A1 (zh) 发现和连接电子设备的方法以及电子设备
US20220103332A1 (en) Electronic device performing neighbor awareness networking communication and method for operation thereof
WO2018186846A1 (en) Facilitating connection establishment to wireless network
WO2024113320A1 (zh) 一种调度服务方法及装置、设备、存储介质
WO2023030052A1 (zh) 一种通信方法及装置
WO2024114241A1 (zh) 一种设备发现方法、设备及系统
WO2023011212A1 (zh) 设备发现方法和装置
WO2024051488A1 (zh) 一种信息传输方法和装置
JP7034596B2 (ja) 通信装置、通信方法、及びプログラム
JP2006165686A (ja) 通信端末装置、通信制御方法、及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22778854

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022778854

Country of ref document: EP

Effective date: 20230901

NENP Non-entry into the national phase

Ref country code: DE