WO2024255375A1 - 设备发现方法及相关装置 - Google Patents

设备发现方法及相关装置 Download PDF

Info

Publication number
WO2024255375A1
WO2024255375A1 PCT/CN2024/083080 CN2024083080W WO2024255375A1 WO 2024255375 A1 WO2024255375 A1 WO 2024255375A1 CN 2024083080 W CN2024083080 W CN 2024083080W WO 2024255375 A1 WO2024255375 A1 WO 2024255375A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel
electronic device
monitoring
time period
performs
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2024/083080
Other languages
English (en)
French (fr)
Other versions
WO2024255375A9 (zh
Inventor
王睿
马红阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Publication of WO2024255375A1 publication Critical patent/WO2024255375A1/zh
Publication of WO2024255375A9 publication Critical patent/WO2024255375A9/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4122Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • 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
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • the present application relates to the field of communication technology, and in particular to a device discovery method and related apparatus.
  • wireless Miracast screen projection In the application scenario of wireless Miracast screen projection, electronic device A that supports wireless fidelity (Wi-Fi) peer-to-peer (P2P) protocol can be paired with electronic device B that supports Wi-Fi P2P protocol. After the two electronic devices are successfully paired, the screen content of electronic device A can be projected to the interface of electronic device B.
  • Wi-Fi wireless fidelity
  • P2P peer-to-peer
  • the second electronic device before the first time period, the second electronic device also receives an operation for screen projection. In this way, the second electronic device can start channel scanning when the user wants to project the screen, thereby reducing unnecessary device discovery processes.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device.
  • the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the electronic device may use a single input single output (SISO) method for data transmission.
  • SISO single input single output
  • the electronic device transmits data based on a Wi-Fi connection, it uses one antenna for data transmission.
  • the Wi-Fi module in the electronic device establishes Wi-Fi connections in the 2.4 GHz band and the 5 GHz band, respectively, and each Wi-Fi connection uses one antenna for data transmission. That is, the electronic device uses one antenna for data transmission in the 2.4 GHz band and another antenna for data transmission in the 5 GHz band, that is, 1*1 2.4 GHz+1*1 5 GHz, where the first 1 in 1*1 represents one transmitting antenna, and the second 1 represents one receiving antenna.
  • the SISO method is equivalent to one Wi-Fi connection corresponding to one antenna, that is, corresponding to one data stream.
  • the electronic device may use a multiple input multiple output (MIMO) method for data transmission.
  • MIMO multiple input multiple output
  • the electronic device transmits data based on a Wi-Fi connection, it uses two antennas for data transmission.
  • the Wi-Fi module in the electronic device uses two antennas for data transmission in the 2.4GHz frequency band
  • the Wi-Fi module in the electronic device can also use the above two antennas for data transmission in the 5GHz frequency band. That is to say, 2*2 2.4GHz+2*2 5GHz, where the first 2 in 2*2 represents 2 transmitting antennas, and the second 2 represents 2 receiving antennas.
  • the MIMO method is equivalent to one Wi-Fi connection corresponding to 2 antennas, that is, corresponding to two data streams, and the transmission rate of the two data streams can be twice the transmission rate of one data stream.
  • the application layer may include a series of application packages. As shown in Figure 2, the application package may include applications such as video, music, and browser. Applications may include system applications and third-party applications.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc.
  • Content providers are used to implement data sharing between different applications, allowing one program to access data in another program while ensuring the security of the accessed data.
  • Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the virtual machine can be used to perform functions such as screen projection display of electronic devices and device discovery processes based on the Wi-Fi P2P protocol.
  • the system library can also be called the Native layer, which can include multiple functional modules, such as media libraries, function libraries, and graphics processing libraries (such as OpenGL ES).
  • the Native layer can include multiple functional modules, such as media libraries, function libraries, and graphics processing libraries (such as OpenGL ES).
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the function library provides developers with API interfaces for multiple services, making it easy for developers to quickly integrate and implement various functions.
  • the graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.
  • the hardware abstraction layer is an abstracted structure between the kernel layer and the Android runtime.
  • the hardware abstraction layer can be a package of the hardware driver, providing a unified interface for the call of the upper layer application.
  • the hardware abstraction layer may include a Wpa_supplicant module, which can be used to perform logical control of monitoring, scanning, etc. of the Wi-Fi P2P protocol.
  • the kernel layer is a layer between hardware and software.
  • the kernel layer may include Wi-Fi drivers, display drivers, audio drivers, Bluetooth drivers, etc.
  • the Wi-Fi driver may be used to scan, monitor, or search for channels.
  • a in FIG3 is a drop-down menu interface 300 of a mobile phone, and the drop-down menu interface 300 may include multiple function switches, such as a network switch, a Bluetooth switch, a flashlight switch, etc.
  • the drop-down menu interface 300 may also include a wireless screen projection switch 301. Among them, wireless screen projection may also be called mobile screen projection, smart screen projection, etc.
  • the mobile phone can display the interface 302 as shown in FIG3 b, and the mobile phone can find nearby devices that can cast screens.
  • Interface 302 can display a wireless screen casting dialog box 303, which can include prompt information, a cancel button, and a view help button, wherein the prompt information can include "Searching for available devices", the cancel button can be used to cancel the wireless screen casting, and the view help button can be used to view help information related to the wireless screen casting.
  • the smart TV when the user triggers the accept button, the smart TV can establish a trusted connection with the mobile phone. The next time the mobile phone wants to select the smart TV for screen projection, the projection window 401 may not be displayed in the interface 400 of the smart TV, and the screen content of the mobile phone can be displayed on the interface of the smart TV.
  • the process of the mobile phone discovering the smart TV is implemented based on the Wi-Fi P2P protocol.
  • the device discovery process based on the Wi-Fi P2P protocol can realize mutual discovery between two devices, so both the mobile phone and the smart TV can perform the device discovery process based on the Wi-Fi P2P protocol.
  • Figure 5 shows the device discovery process based on the Wi-Fi P2P protocol.
  • the smart TV can perform full channel scanning. At this time, the smart TV is in the scanning state, which is in the scanning stage in the Wi-Fi P2P protocol.
  • the full channel scan can scan devices by sending probe requests on channels in the 2.4GHz frequency band and the 5GHz frequency band.
  • the smart TV After the smart TV completes the full channel scan, it can enter the listening state.
  • the time of the state can be randomly selected in 100/200/300 time units (TU).
  • the smart TV can select any channel in the social channel as the channel to be monitored. It is understandable that once the smart TV selects a channel, the channel to be monitored will not change subsequently.
  • the smart TV restarts the discovery next time, the smart TV can reselect any channel in the social channel as the channel to be monitored.
  • the smart TV When the smart TV is in the listening state, the smart TV can be discovered by the P2P device 2.
  • the mobile phone will be described as the P2P device 2 in the following.
  • the smart TV After the listening state, the smart TV can enter the search state.
  • the smart TV can search on each channel of the social channel.
  • the smart TV When the smart TV is in the search state, the smart TV can find the mobile phone in the listening state.
  • the smart TV can subsequently cycle between the listening state and the searching state. For example, after the searching state, the smart TV can enter the listening state again, and after the listening state, the smart TV can enter the searching state again.
  • the listening state and the searching state are both in the discovery phase of the Wi-Fi P2P protocol.
  • the channel monitored is channel 1 of the 2.4GHz frequency band, and the listening time is 200TU.
  • the channel monitored is still channel 1, and the listening time can be 100TU.
  • the mobile phone can discover the smart TV, or when a mobile phone is in the searching state and scans channel 1, the mobile phone can discover the smart TV.
  • the mobile phone wants to discover the smart TV, the mobile phone needs to be in the scanning state or the searching state, the smart TV needs to be in the listening state, and the channel scanned or searched by the mobile phone is the same channel as the channel monitored by the smart TV.
  • a discovery process makes it take a long time for the smart TV to be discovered, which reduces the user experience.
  • the smart TV can perform a full channel scan after starting discovery. For example, it takes about 3.4 seconds for the smart TV to scan 26 channels. After completing the full channel scan, the smart TV can switch to the listening state. For example, the smart TV can listen to 6 channels for 307 milliseconds (ms). After the listening state, the smart TV can switch to the working channel. For example, the working channel can be channel 149 in the 5GHz frequency band. The smart TV can communicate data with the AP on the working channel, so that the network between the smart TV and the AP will not be disconnected. After a delay of 50ms on the working channel, the smart TV can switch to the search state. For example, the smart TV can search for 626ms on the social channel.
  • the smart TV can search for 626ms on the social channel.
  • the smart TV can switch back to the monitoring state and execute the above process repeatedly.
  • different electronic devices may have different delay durations in the working channel.
  • the delay duration of some electronic devices in the working channel may be about 100ms.
  • the embodiment of the present application does not limit the specific delay duration of the electronic device in the working channel.
  • each cycle process shown in FIG. 6 may take more than 900 milliseconds.
  • 307ms of the smart TV is in a state where it can be discovered by the mobile phone, which makes it difficult for the smart TV to be discovered and increases the time it takes for the smart TV to be discovered.
  • 50ms of the smart TV can communicate with the AP in these 900 milliseconds, which makes the network of the smart TV worse and reduces the user experience.
  • the data transmission rate between the smart TV and the router is about 350Mbps, which is relatively high.
  • the smart TV wants to be discovered by the mobile phone, the smart TV needs to switch from channel 149 of the 5GHz band to the social channel of the 2.4GHz band for monitoring.
  • the data transmission rate between the smart TV and the router may drop to about 70Mbps, which is relatively low, and the interface of the smart TV may freeze. Therefore, the process of smart TV being discovered based on the Wi-Fi P2P protocol can have a greater impact on the data transmission of the site. Big impact.
  • the device discovery method provided in the embodiment of the present application, in the device discovery process of wireless Miracast screen projection, since the smart TV does not need to discover the mobile phone, the smart TV does not need to switch to the scanning state or the searching state in the device discovery process based on the Wi-Fi P2P protocol, and the smart TV can be discovered by the mobile phone in the listening state. In this way, the smart TV can be in the listening state for a longer time, increasing the probability of the smart TV being discovered, reducing the time of screen projection discovery, and thus improving the screen projection experience.
  • the device discovery method in the embodiment of the present application may include the following three cases:
  • Case 1 If the smart TV STA is not connected to the AP, the smart TV randomly selects a channel in the social channel to perform Wi-Fi P2P loop monitoring.
  • the smart TV can start the device discovery process based on the Wi-Fi P2P protocol when it is turned on. In this way, the smart TV is always in a discovered state and can be discovered by other devices at any time without the user having to perform complex operations, thereby improving the user experience.
  • the smart TV can start the device discovery process based on the Wi-Fi P2P protocol when entering the wireless screen projection window. In this way, the smart TV can be in a discovered state when the user wants to project the screen, reducing the execution of unnecessary device discovery processes.
  • Case 2 If the smart TV STA is connected to the AP of the social channel, the smart TV performs Wi-Fi P2P loop monitoring on the channel to which the smart TV STA is connected.
  • the smart TV STA in the device discovery process based on the Wi-Fi P2P protocol, if the smart TV STA is connected to the AP of the social channel, it means that the working channel of the smart TV STA is a channel in the social channel, and the smart TV does not need to switch channels.
  • the smart TV can use the connected social channel as the channel monitored by the smart TV in the monitoring state.
  • situation 2 can be as shown in Figure 8 above.
  • the smart TV After the smart TV starts to discover, it can keep looping and monitoring on channel 1. In this way, the smart TV can interact with the AP on channel 1 and be discovered, thereby reducing frequent channel switching, increasing the probability of the smart TV being discovered, shortening the screen projection time, and improving the Internet experience of the smart TV.
  • Case 3 If the smart TV STA is connected to an AP on a non-social channel, the smart TV performs Wi-Fi P2P loop monitoring on the social channel and the smart TV STA working channel. Optionally, if the smart TV STA is connected to an AP on a 2.4G non-social channel, the smart TV can also perform Wi-Fi P2P loop monitoring on the smart TV STA's working channel.
  • the smart TV STA in the device discovery process based on the Wi-Fi P2P protocol, if the smart TV STA is connected to an AP on a non-social channel, it means that the social channel and the working channel of the smart TV STA are not on the same channel.
  • the working channel of the smart TV STA is channel 149 of the 5GHz band
  • the social channel is channel 1 of the 2.4GHz band.
  • the smart TV can perform cyclic monitoring on the social channel and the working channel of the smart TV STA.
  • the smart TV STA is connected to an AP on a 2.4G non-social channel, it means that the social channel and the working channel of the smart TV STA are not on the same channel.
  • the working channel of the smart TV STA is channel 3 of the 2.4GHz band
  • the social channel is channel 1 of the 2.4GHz band.
  • the smart TV can perform loop monitoring on channel 3.
  • the mobile phone performs a full channel scan, since the smart TV is always on channel 3, the mobile phone is more likely to scan the smart TV.
  • the smart TV can interact with the AP on channel 3 and can also be in a discoverable state, which reduces It not only reduces the frequent channel switching, but also improves the Internet experience of smart TV.
  • the smart TV can monitor 10ms on channel 1 of the 2.4GHz frequency band, monitor 90ms on the working channel, and then continue to monitor 10ms on channel 1 and 90ms on the working channel, and monitor in sequence.
  • the smart TV can be in a monitoring state for a period of time, so that the smart TV can be discovered, and can also be in a communication state with the AP for most of the time, so that the network connected to the smart TV will not be disconnected, reducing the interface freeze of the smart TV.
  • the smart TV may also first monitor on the working channel, and then monitor on channel 1 of the 2.4 GHz frequency band, which is not limited in the embodiment of the present application.
  • the smart TV may first monitor on the working channel for 90 ms, then monitor on channel 1 for 10 ms, and then continue to monitor on the working channel for 90 ms, and monitor on channel 1 for 10 ms, and so on.
  • the smart TV it is necessary for the smart TV to monitor the social channel for a period of time.
  • the smart TV STA is connected to the AP of the 5GHz frequency band and only monitors on the working channel, the mobile phone that only supports the 2.4G frequency band will not be able to discover the smart TV.
  • the mobile phone does not find the smart TV during the scanning phase, the mobile phone will scan on the social channel. If the smart TV only monitors on the working channel, the mobile phone will not be able to find the smart TV. Therefore, the smart TV can increase the probability of being discovered by monitoring the social channel for a period of time.
  • the listening time of the smart TV on the social channel and the listening time on the working channel can be pre-set by the smart TV.
  • the listening time on the social channel and the listening time on the working channel can be equal or different, which is not limited in the embodiment of the present application.
  • Tables 1, 2, and 3 below show the duration of the mobile phone discovering the smart TV and the duration of the mobile phone connecting to the smart TV when the ratio of the monitoring duration of the social channel to the monitoring duration of the STA working channel is different.
  • a dual-band mobile phone can be understood as a mobile phone that supports both 5G and 2.4G
  • a 2.4G only mobile phone can be understood as a mobile phone that only supports 2.4G.
  • the ratio of the social channel monitoring time to the STA working channel monitoring time cannot be too large or too small. If the ratio of the social channel monitoring time to the STA working channel monitoring time is too large, for example, the smart TV has been listening on the social channel and not on the working channel, the network connection between the smart TV and the router may be disconnected, causing the network rate to drop to zero and the user's Internet experience to deteriorate. If the ratio of the social channel monitoring time to the STA working channel monitoring time is too small, for example, the smart TV has been listening on the working channel and not on the social channel, a mobile phone that only supports the 2.4G frequency band may not be easy to find or cannot find the smart TV. In order to prevent the network connected to the smart TV from being disconnected, the smart TV can set the listening time on the working channel to be longer than the listening time on the social channel, so that the smart TV can be discovered without affecting the user's viewing of the smart TV.
  • the influence of other factors such as the channel switching time, the scanning time of a single channel, and the delay requirement of the service may also be considered.
  • FIG13 shows a device discovery method according to an embodiment of the present application.
  • the method includes:
  • S1301 In a first time period, a first electronic device performs channel monitoring, and a second electronic device performs channel scanning.
  • the first electronic device can be understood as the screen projection display end in the wireless screen projection scenario, for example, the first electronic device can be understood as the smart TV in the above embodiment.
  • the second electronic device can be understood as the screen projection source end in the wireless screen projection scenario, for example, the second electronic device can be understood as the mobile phone in the above embodiment.
  • the first time period can be understood as the time period during which the second electronic device performs channel scanning, or can be understood as the duration during which the second electronic device performs channel scanning. It is understandable that the duration during which the first electronic device performs channel monitoring and the duration during which the second electronic device performs channel scanning can be the same or different.
  • Channel monitoring can be understood as the monitoring of the channel by the electronic device in the listening state in the embodiment corresponding to Fig. 5.
  • Channel scanning can be understood as the monitoring of the channel by the electronic device in the scanning state in the embodiment corresponding to Fig. 5.
  • the second time period can be understood as the time period during which the second electronic device performs channel monitoring, or can be understood as the duration during which the second electronic device performs channel monitoring. It is understandable that the duration during which the first electronic device performs channel monitoring and the duration during which the second electronic device performs channel monitoring can be the same or different.
  • the third time period can be understood as the time period during which the second electronic device performs the channel search, or can be understood as the duration during which the second electronic device performs the channel search. It can be understood that the duration during which the first electronic device performs the channel monitoring and the duration during which the second electronic device performs the channel search can be the same or different.
  • Channel search can be understood as the electronic device in the embodiment corresponding to FIG. 5 being in a search state.
  • Channel monitoring can be understood as the electronic device in the embodiment corresponding to FIG. 5 being in a search state.
  • the channel monitoring, channel scanning and channel searching in the embodiments of the present application are all general terms, that is, the channel monitoring performed by the first electronic device and the channel monitoring performed by the second electronic device are respectively different execution processes.
  • the channel monitoring performed by the second electronic device in different time periods may also be different.
  • the channels monitored by the second electronic device in different time periods may be different; the channel searching performed by the second electronic device in different time periods may also be different.
  • the channels searched by the second electronic device in different time periods may be different.
  • the fourth time period can be understood as the time period during which the second electronic device performs channel monitoring, or can be understood as the duration during which the second electronic device performs channel monitoring. It can be understood that the duration of the fourth time period can be the same as or different from the duration of the second time period.
  • the first electronic device performs channel monitoring, and the second electronic device performs channel searching; wherein the first time period is continuous with the second time period, the second time period is continuous with the third time period, the third time period is continuous with the fourth time period, and the fourth time period is continuous with the fifth time period.
  • the fifth time period can be understood as the time period for the second electronic device to perform a channel search, and can also be understood as the duration for the second electronic device to perform a channel search. It is understandable that the duration of the fifth time period and the duration of the third time period can be the same or different.
  • the first electronic device does not need to switch to a scanning state or a search state, and the first electronic device can be discovered by the second electronic device in a listening state. In this way, the first electronic device can be in a listening state for a longer period of time, which increases the probability of the first electronic device being discovered, reduces the time for screen projection discovery, and thus improves the screen projection experience.
  • the first electronic device when the first electronic device performs channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device performs monitoring on a first channel, wherein the first channel belongs to a social channel.
  • the first channel may be channel 1, channel 6 or channel 11 of the 2.4 GHz frequency band.
  • the first electronic device In the device discovery process, if the first electronic device is not connected to the wireless access point AP, you can refer to the relevant description of situation 1 in the above embodiment and the relevant description in the embodiment corresponding to the above FIG8 , which will not be repeated here.
  • the first electronic device keeps listening in a loop on the first channel, which can increase the probability of being discovered and shorten the screen projection time.
  • the first electronic device when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the second channel, the first electronic device performs monitoring on the second channel, wherein the second channel belongs to a social channel.
  • the second channel may be channel 1, channel 6 or channel 11 of the 2.4 GHz frequency band.
  • the first electronic device can both interact with the AP on channel 1 and be in a discoverable state, thereby reducing frequent channel switching, increasing the probability of the first electronic device being discovered, shortening the screen projection time, and improving the Internet experience of the first electronic device.
  • the first electronic device when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the third channel, the first electronic device performs monitoring on the third channel, wherein the third channel belongs to a non-social channel in the 2.4 GHz frequency band.
  • the third channel may be channel 2, channel 3, channel 4, channel 5, channel 7 in the 2.4 GHz frequency band.
  • the first electronic device If the first electronic device is connected to an AP of a 2.4G non-social channel, it means that the social channel and the working channel of the first electronic device are not on the same channel.
  • the first electronic device performs cyclic monitoring on the third channel, and the first electronic device can be scanned with a high probability. In this way, the first electronic device can interact with the AP on the third channel and can also be in a discovered state, which reduces frequent channel switching and improves the Internet experience of the first electronic device.
  • the first electronic device when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the fourth channel, the first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, wherein the fourth channel belongs to a non-social channel and the fifth channel belongs to a social channel.
  • the first electronic device can be in a listening state for a period of time so that the first electronic device can be discovered, and can also be in a communication state with the AP most of the time so that the network connected to the first electronic device will not be disconnected, reducing interface freezes of the first electronic device.
  • the first electronic device supports a dual-band dual-transmit DBDC working mode, and when the first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, if the first electronic device switches from the fourth channel to the fifth channel to perform monitoring, the first electronic device switches from dual-antenna operation to single-antenna operation; if the first electronic device switches from the fifth channel to the fourth channel to perform monitoring, the first electronic device switches from single-antenna operation to dual-antenna operation.
  • the switching of the first electronic device between dual-antenna working and single-antenna working can refer to the relevant description of monitoring mode 1 in the above embodiment, and no further description is given.
  • the switching of the first electronic device between dual-antenna working and single-antenna working can ensure that the network rate of the first electronic device does not drop to zero when the first electronic device is in the monitoring state of Wi-Fi P2P.
  • the first electronic device in the scenario where the first electronic device supports the dual-band dual-transmit DBDC working mode, the first electronic device notifies the AP through the Wi-Fi management frame.
  • the relevant description of the monitoring method 1 in the above embodiment can be referred to and will not be repeated here.
  • the AP in the embodiment corresponding to FIG. 13 is a general term, that is, the AP to which the first electronic device is connected in different time periods may not be the same AP.
  • the first electronic device notifies the AP through a Wi-Fi management frame or the like, so that after the first electronic device switches the antenna, data transmission and reception between the first electronic device and the AP will not be affected.
  • the first electronic device supports the dual-band dual-transmit DBDC working mode, and when the first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, if the first electronic device performs monitoring on the fourth channel, the first electronic device uses two antennas to communicate with the AP on the fourth channel, and uses two antennas to perform monitoring on the fourth channel; if the first electronic device performs monitoring on the fifth channel, the first electronic device uses one antenna to communicate with the AP on the fourth channel, and uses another antenna to perform monitoring on the fifth channel.
  • the first electronic device in the scenario where the first electronic device supports the dual-band dual-transmit DBDC working mode, the first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, which can refer to the relevant description of the monitoring mode 1 in the above embodiment.
  • the first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, which can not only satisfy the user's Internet experience, but also realize the rapid discovery of screen projection.
  • the first electronic device supports a dual-band synchronous DBS working mode.
  • the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the sixth channel, the first electronic device uses two antennas to communicate with the AP on the sixth channel, and uses the two antennas to perform monitoring on the sixth channel, wherein the sixth channel belongs to the 5GHz frequency band.
  • the first electronic device in the scenario where the first electronic device supports the dual-band synchronous DBS working mode, can connect to the AP of the sixth channel by referring to the relevant description of the monitoring method 2 in the above embodiment, which will not be repeated.
  • the first electronic device can communicate with the AP and can also perform cyclic monitoring on the social channel, so that the Internet access rate of the first electronic device is not reduced, and the discovery of the screen projection is accelerated.
  • the second electronic device before the first time period, it may also include: the second electronic device receives an operation for screen projection.
  • the operation for screen projection may include the operation of the user clicking the screen projection button, the screen projection triggering operation of the user's voice input, etc., which is not limited in the embodiment of the present application.
  • the screen projection button may be, for example, the wireless screen projection switch 301 in the embodiment corresponding to FIG. 3 above.
  • the second electronic device performs channel scanning after receiving the operation for screen projection, so that the second electronic device can start channel scanning when the user wants to project the screen, thereby reducing the execution of unnecessary device discovery processes.
  • FIG14 shows a device discovery method according to an embodiment of the present application.
  • the method includes:
  • S1401 In a first time period, a first electronic device performs channel monitoring, and a second electronic device performs channel scanning.
  • the first electronic device and the second electronic device can refer to the relevant description in step S1301 of the embodiment corresponding to FIG. 13 above, and no further details are given.
  • the first time period can be understood as the time period during which the second electronic device performs channel scanning, or can be understood as the duration during which the second electronic device performs channel scanning. It is understandable that the duration during which the first electronic device performs channel monitoring and the duration during which the second electronic device performs channel scanning can be the same or different.
  • Channel monitoring and channel scanning may refer to the relevant description in step S1301 of the embodiment corresponding to FIG. 13 above, and will not be described in detail.
  • S1402 In a second time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching.
  • the second time period can be understood as the time period during which the second electronic device performs the channel search, or can be understood as the duration during which the second electronic device performs the channel search. It is understandable that the duration during which the first electronic device performs the channel monitoring and the duration during which the second electronic device performs the channel search can be the same or different.
  • the channel search may refer to the relevant description in step S1301 of the embodiment corresponding to FIG. 13 above, which will not be described in detail.
  • the third time period can be understood as the time period during which the second electronic device performs a task on the working channel of the second electronic device, or can be understood as the duration during which the second electronic device performs a task on the working channel of the second electronic device. It can be understood that the duration during which the first electronic device performs channel monitoring and the duration during which the second electronic device performs a task on the working channel of the second electronic device can be the same or different.
  • the fourth time period can be understood as the time period during which the second electronic device performs channel search. It can be understood as the duration of the second electronic device performing the channel search. It can be understood that the duration of the fourth time period can be the same as or different from the duration of the second time period.
  • S1405 In a fifth time period, the first electronic device performs channel monitoring, and the second electronic device performs a task on a working channel of the second electronic device.
  • the fifth time period can be understood as the time period in which the second electronic device performs the task on the working channel of the second electronic device, and can also be understood as the duration of the second electronic device performing the task on the working channel of the second electronic device. It can be understood that the duration of the fifth time period can be the same as or different from the duration of the third time period.
  • the first electronic device performs channel monitoring and the second electronic device performs channel searching; wherein the first time period is continuous with the second time period, the second time period is continuous with the third time period, the third time period is continuous with the fourth time period, the fourth time period is continuous with the fifth time period, and the fifth time period is continuous with the sixth time period.
  • the sixth time period can be understood as the time period during which the second electronic device performs the channel search, or can be understood as the duration during which the second electronic device performs the channel search. It can be understood that the duration of the sixth time period can be the same as or different from the duration of the fourth time period.
  • the execution steps corresponding to the third time period and the fifth time period may not be executed. That is, the second time period may be continuous with the fourth time period, and the fourth time period may be continuous with the sixth time period.
  • the first electronic device does not need to switch to the scanning state or the searching state.
  • the first electronic device can be discovered by the second electronic device in the listening state.
  • the second electronic device does not need to switch to the listening state. It only needs to keep the scanning state and the searching state to discover the first electronic device. In this way, the screen projection time can be reduced and the user experience can be improved.
  • the second electronic device performs a channel search on the working channel of the second electronic device, in the fourth time period, the second electronic device performs a channel search on the social channel, and in the sixth time period, the second electronic device performs a channel search on the working channel of the second electronic device.
  • the second electronic device performs a channel search on the working channel of the second electronic device, or performs a channel search on the social channel.
  • the embodiment of the present application replaces the listening state in the device discovery process with a scanning state for scanning the working channel of the second electronic device, which can increase the probability of the second electronic device discovering the first electronic device when projecting the screen and reduce the projection discovery time.
  • the second electronic device performs a channel search on a social channel and a working channel of the second electronic device.
  • the second electronic device performs channel search in the social channel and the working channel of the second electronic device. Please refer to the relevant description in Improvement 3 corresponding to the above embodiment and the relevant description in the embodiment corresponding to the above Figure 12, and no further details will be given.
  • the second electronic device When the second electronic device performs channel scanning in the search state, in addition to searching the social channel, it can also search the working channel of the second electronic device. In this way, the probability of the second electronic device finding the first electronic device when casting the screen can be increased, and the casting discovery time can be reduced.
  • the first electronic device when the first electronic device performs channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device performs monitoring on the first channel, wherein the first channel Belongs to social channels.
  • the first electronic device during the device discovery process, if the first electronic device is not connected to the wireless access point AP, reference can be made to the relevant description of situation 1 in the above embodiment, as well as the relevant description in the embodiment corresponding to the above FIG8 , which will not be repeated here.
  • the first electronic device has been cyclically monitoring on the first channel, which can increase the probability of being discovered and shorten the screen projection time.
  • the first electronic device when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the second channel, the first electronic device performs monitoring on the second channel, wherein the second channel belongs to a social channel.
  • the first electronic device can both interact with the AP on channel 1 and be in a discoverable state, thereby reducing frequent channel switching, increasing the probability of the first electronic device being discovered, shortening the screen projection time, and improving the Internet experience of the first electronic device.
  • the first electronic device when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the third channel, the first electronic device performs monitoring on the third channel, wherein the third channel belongs to a non-social channel in the 2.4 GHz frequency band.
  • the first electronic device if the first electronic device is connected to an AP of a 2.4G non-social channel, it means that the social channel and the working channel of the first electronic device are not on the same channel.
  • the first electronic device performs cyclic monitoring on the third channel, and the first electronic device can be scanned with a high probability. In this way, the first electronic device can interact with the AP on the third channel and can also be in a discovered state, which reduces frequent channel switching and improves the Internet experience of the first electronic device.
  • the first electronic device when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the fourth channel, the first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, wherein the fourth channel belongs to a non-social channel and the fifth channel belongs to a social channel.
  • the first electronic device can be in a listening state for a period of time so that the first electronic device can be discovered, and can also be in a communication state with the AP most of the time so that the network connected to the first electronic device will not be disconnected, reducing interface freezes of the first electronic device.
  • the second electronic device may also include: the second electronic device receives an operation for screen projection.
  • the operation for screen projection may include the operation of the user clicking the screen projection button, the screen projection triggering operation of the user's voice input, etc., which is not limited in the embodiment of the present application.
  • the screen projection button can be, for example, the wireless screen projection switch 301 in the embodiment corresponding to Figure 3 above.
  • the second electronic device performs channel scanning after receiving the operation for screen projection, so that the second electronic device can start channel scanning when the user wants to cast the screen, thereby reducing the execution of unnecessary device discovery processes.
  • first time period in the embodiment corresponding to FIG. 13 and the first time period in the embodiment corresponding to FIG. 14 may be different time periods
  • second time period in the embodiment corresponding to FIG. 13 and the second time period in the embodiment corresponding to FIG. 14 may be different time periods
  • third time period in the embodiment corresponding to FIG. 13 and the third time period in the embodiment corresponding to FIG. 14 may be different time periods.
  • the third time period in the example may be a different time period
  • the fourth time period in the embodiment corresponding to FIG13 and the fourth time period in the embodiment corresponding to FIG14 may be different time periods
  • the fifth time period in the embodiment corresponding to FIG13 and the fifth time period in the embodiment corresponding to FIG14 may be different time periods.
  • the concepts of the first time period, the second time period, the third time period, the fourth time period, and the fifth time period are only understood in their respective embodiments.
  • the first channel in the embodiment corresponding to FIG. 13 and the first channel in the embodiment corresponding to FIG. 14 may be different channels
  • the second channel in the embodiment corresponding to FIG. 13 and the second channel in the embodiment corresponding to FIG. 14 may be different channels
  • the third channel in the embodiment corresponding to FIG. 13 and the third channel in the embodiment corresponding to FIG. 14 may be different channels
  • the fourth channel in the embodiment corresponding to FIG. 13 and the fourth channel in the embodiment corresponding to FIG. 14 may be different channels
  • the fifth channel in the embodiment corresponding to FIG. 13 and the fifth channel in the embodiment corresponding to FIG. 14 may be different channels.
  • the concepts of the first channel, the second channel, the third channel, the fourth channel, and the fifth channel are only understood in their respective embodiments.
  • FIG15 shows a device discovery method according to an embodiment of the present application.
  • the method includes:
  • S1501 The first electronic device continues to perform channel monitoring.
  • the first electronic device can refer to the relevant description in step S1301 of the embodiment corresponding to FIG. 13 above, and no further details are given.
  • Channel monitoring may refer to the relevant description in step S1301 of the embodiment corresponding to FIG. 13 above, which will not be described in detail.
  • S1502 When the second electronic device performs device discovery, the second electronic device cyclically performs channel monitoring and channel searching after performing channel scanning, or the second electronic device continuously performs channel searching after performing channel scanning.
  • the second electronic device can refer to the relevant description in step S1301 of the embodiment corresponding to FIG. 13 above, and will not be repeated.
  • Channel scanning and channel searching can refer to the relevant description in step S1301 of the embodiment corresponding to FIG. 13 above, and will not be repeated.
  • the first electronic device does not need to switch to the scanning state or the searching state.
  • the first electronic device can be discovered by the second electronic device in the listening state.
  • the second electronic device does not need to switch to the listening state. It only needs to keep the scanning state and the searching state to discover the first electronic device. In this way, the screen projection time can be reduced and the user experience can be improved.
  • the first electronic device when the first electronic device continuously performs channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device continuously performs channel monitoring on a first channel, wherein the first channel belongs to a social channel.
  • the first electronic device during the device discovery process, if the first electronic device is not connected to the wireless access point AP, reference can be made to the relevant description of situation 1 in the above embodiment, as well as the relevant description in the embodiment corresponding to the above FIG8 , which will not be repeated here.
  • the first electronic device has been cyclically monitoring on the first channel, which can increase the probability of being discovered and shorten the screen projection time.
  • the first electronic device when the first electronic device continuously performs channel monitoring, if the first electronic device is connected to the AP of the second channel, the first electronic device continuously performs channel monitoring on the second channel, wherein the second channel belongs to a social channel.
  • the first electronic device can interact with the AP on channel 1 and be in a discoverable state, thereby reducing frequent channel switching, increasing the probability of the first electronic device being discovered, shortening the screen projection time, and improving The first electronic device to surf the Internet.
  • the first electronic device when the first electronic device continues to perform channel monitoring, if the first electronic device is connected to the AP of a third channel, the first electronic device continues to perform channel monitoring on the third channel, wherein the third channel belongs to a non-social channel in the 2.4 GHz frequency band.
  • the first electronic device if the first electronic device is connected to an AP of a 2.4G non-social channel, it means that the social channel and the working channel of the first electronic device are not on the same channel.
  • the first electronic device performs cyclic monitoring on the third channel, and the first electronic device can be scanned with a high probability. In this way, the first electronic device can interact with the AP on the third channel and can also be in a discovered state, which reduces frequent channel switching and improves the Internet experience of the first electronic device.
  • the first electronic device when the first electronic device continues to perform channel monitoring, if the first electronic device is connected to the AP of the fourth channel, the first electronic device cyclically performs channel monitoring on the fourth channel and the fifth channel, wherein the fourth channel belongs to a non-social channel and the fifth channel belongs to a social channel.
  • the first electronic device can be in a listening state for a period of time so that the first electronic device can be discovered, and can also be in a communication state with the AP most of the time so that the network connected to the first electronic device will not be disconnected, reducing interface freezes of the first electronic device.
  • the first channel in the embodiment corresponding to FIG. 14 and the first channel in the embodiment corresponding to FIG. 15 may be different channels
  • the second channel in the embodiment corresponding to FIG. 14 and the second channel in the embodiment corresponding to FIG. 15 may be different channels
  • the third channel in the embodiment corresponding to FIG. 14 and the third channel in the embodiment corresponding to FIG. 15 may be different channels
  • the fourth channel in the embodiment corresponding to FIG. 14 and the fourth channel in the embodiment corresponding to FIG. 15 may be different channels
  • the fifth channel in the embodiment corresponding to FIG. 14 and the fifth channel in the embodiment corresponding to FIG. 15 may be different channels.
  • the concepts of the first channel, the second channel, the third channel, the fourth channel, and the fifth channel are only understood in their respective embodiments.
  • user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • the above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method.
  • it includes hardware structures and/or software modules corresponding to the execution of each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
  • the embodiment of the present application can divide the functional modules of the device implementing the method according to the above method example.
  • each functional module can be divided according to each function, or two or more functions can be integrated into one processing module.
  • the integrated module can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other divisions during implementation.
  • FIG16 is a schematic diagram of the structure of a chip provided in an embodiment of the present application.
  • the chip 1600 includes one or more (including two) processors 1601 , a communication line 1602 , a communication interface 1603 and a memory 1604 .
  • the memory 1604 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
  • the method described in the above embodiment of the present application can be applied to the processor 1601, or implemented by the processor 1601.
  • the processor 1601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 1601 or an instruction in the form of software.
  • the above processor 1601 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components.
  • the processor 1601 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.
  • the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM).
  • the storage medium is located in the memory 1604, and the processor 1601 reads the information in the memory 1604 and completes the steps of the above method in combination with its hardware.
  • the processor 1601 , the memory 1604 , and the communication interface 1603 may communicate with each other via the communication line 1602 .
  • the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.
  • the embodiment of the present application also provides a computer program product including one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • wired e.g., coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless e.g., infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated.
  • the available medium may include a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
  • Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another.
  • the storage medium may be any target medium that can be accessed by a computer.
  • the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a compact disc read-only memory (CD-ROM), a RAM, a ROM, an EEPROM or other optical disc storage; The medium may include disk storage or other disk storage devices. Also, any connection may be appropriately referred to as a computer readable medium.
  • Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically using lasers.
  • each process and/or box in the flowchart and/or block diagram and the combination of the process and/or box in the flowchart and/or block diagram can be realized by computer program instructions.
  • These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device produce a device for realizing the function specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.

Landscapes

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

Abstract

本申请实施例提供的设备发现方法及相关装置,涉及通信技术领域。方法包括:在无线Miracast投屏的设备发现过程中,由于智能电视不需要发现手机,因此在设备发现过程中,智能电视可以不需要切换到扫描状态或搜索状态,智能电视处于监听状态就可以被手机发现。这样,智能电视可以较长时间处于监听状态,增加智能电视被发现的概率,降低投屏发现的时间,从而可以提升投屏体验。

Description

设备发现方法及相关装置
本申请要求于2023年06月15日提交中国国家知识产权局、申请号为202310717557.6、申请名称为“设备发现方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及设备发现方法及相关装置。
背景技术
随着电子技术的发展,一些电子设备支持无线Miracast投屏。在无线Miracast投屏的应用场景中,支持无线保真(wireless fidelity,Wi-Fi)对等网络(peer to peer,P2P)协议的电子设备A可以与支持Wi-Fi P2P协议的电子设备B进行配对。在两个电子设备配对成功后,电子设备A的屏幕内容可以投屏到电子设备B的界面上。
然而,在基于Wi-Fi P2P协议的设备发现过程中,电子设备的发现时间较长,降低了用户体验。
发明内容
本申请实施例提供的设备发现方法及相关装置,在无线Miracast投屏的设备发现过程中,由于智能电视不需要发现手机,因此在基于Wi-Fi P2P协议的设备发现过程中,智能电视可以不需要切换到扫描状态或搜索状态,智能电视处于监听状态就可以被手机发现。这样,智能电视可以较长时间处于监听状态,增加智能电视被发现的概率,降低投屏发现的时间,从而可以提升投屏体验。
第一方面,本申请实施例提供的设备发现方法,方法包括:
第一时间段,第一电子设备执行信道监听,第二电子设备执行信道扫描;第二时间段,第一电子设备执行信道监听,第二电子设备执行信道监听;第三时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索;第四时间段,第一电子设备执行信道监听,第二电子设备执行信道监听;第五时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索;其中,第一时间段与第二时间段连续,第二时间段与第三时间段连续,第三时间段与第四时间段连续,第四时间段与第五时间段连续。这样,可以增加第一电子设备被发现的概率,降低投屏发现的时间,从而可以提升投屏体验。
一种可能的实现中,第一电子设备执行信道监听时,若第一电子设备未连接无线访问接入点AP,第一电子设备在第一信道执行监听,其中,第一信道属于社交信道。这样,第一电子设备一直在第一信道循环监听,可以增加被发现的概率,缩短投屏时间。
一种可能的实现中,第一电子设备执行信道监听时,若第一电子设备连接第二信道的AP,第一电子设备在第二信道执行监听,其中,第二信道属于社交信道。这样,减少了频繁的信道切换,增加第一电子设备被发现的概率,缩短投屏时间,还提升了第一电子设备的上网体验。
一种可能的实现中,第一电子设备执行信道监听时,若第一电子设备连接第三信道的AP,第一电子设备在第三信道执行监听,其中,第三信道属于2.4GHz频段的非社交信道。这样,既减少了频繁的信道切换,又提升了第一电子设备的上网体验。
一种可能的实现中,第一电子设备执行信道监听时,若第一电子设备连接第四信道的AP,第一电子设备在第四信道和第五信道执行循环监听,其中,第四信道属于非社交信道,第五信道属于社交信道。这样,使得第一电子设备连接的网络不会断开,减少第一电子设备的界面卡顿。
一种可能的实现中,第一电子设备支持双频双发DBDC工作模式,第一电子设备在第四信道和第五信道执行循环监听时,若第一电子设备从第四信道切换到第五信道执行监听,第一电子设备从双天线工作切换到单天线工作;若第一电子设备从第五信道切换到第四信道执行监听,第一电子设备从单天线工作切换到双天线工作。这样,第一电子设备在双天线工作和单天线工作之间的切换,可以使得第一电子设备在Wi-Fi P2P的监听状态时,第一电子设备的网络速率不会掉零。
一种可能的实现中,第一电子设备从双天线工作切换到单天线工作时,第一电子设备通过Wi-Fi管理帧通知AP第一电子设备从双天线工作切换到单天线工作;第一电子设备从单天线工作切换到双天线工作时,第一电子设备通过Wi-Fi管理帧通知AP第一电子设备从单天线工作切换到双天线工作。这样,使得第一电子设备在切换天线之后,不会影响第一电子设备与AP之间的数据发送和接收。
一种可能的实现中,第一电子设备支持双频双发DBDC工作模式,第一电子设备在第四信道和第五信道执行循环监听时,若第一电子设备在第四信道执行监听,第一电子设备使用两根天线在第四信道与AP通信,使用两根天线在第四信道执行监听;若第一电子设备在第五信道执行监听,第一电子设备使用一根天线在第四信道与AP通信,使用另一根天线在第五信道执行监听。这样,既可以满足用户的上网体验,也可以实现投屏的快速发现。
一种可能的实现中,第一电子设备支持双频同步DBS工作模式,第一电子设备执行信道监听时,若第一电子设备连接第六信道的AP,第一电子设备使用两根天线在第六信道与AP通信,使用两根天线在第六信道执行监听,其中,第六信道属于5GHz频段的信道。这样,使得在第一电子设备的上网速率不降低的同时,还加快了投屏的发现。
一种可能的实现中,在第一时间段之前,还包括:第二电子设备接收到用于投屏的操作。这样,第二电子设备可以在用户想要投屏时开始执行信道扫描,从而减少执行不必要的设备发现过程。
第二方面,本申请实施例提供的设备发现方法,方法包括:
第一时间段,第一电子设备执行信道监听,第二电子设备执行信道扫描;第二时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索;第三时间段,第一电子设备执行信道监听,第二电子设备在第二电子设备的工作信道执行任务;第四时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索;第五时间段,第一电子设备执行信道监听,第二电子设备在第二电子设备的工作信道执行任务;第六时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索;其中,第一时间段与第二时间段连续,第二时间段与第三时间段连续,第三时间段与第四时间段连续,第四时间段与第五时间段连续,第 五时间段与第六时间段连续。这样,可以增加第一电子设备被发现的概率,降低投屏发现的时间,从而可以提升投屏体验。
一种可能的实现中,在第二时间段,第二电子设备在第二电子设备的工作信道执行信道搜索,在第四时间段,第二电子设备在社交信道执行信道搜索,在第六时间段,第二电子设备在第二电子设备的工作信道执行信道搜索。这样,可以提高第二电子设备投屏时发现第一电子设备的概率,降低投屏发现时长。
一种可能的实现中,第二电子设备在社交信道和第二电子设备的工作信道执行信道搜索。这样,可以提高第二电子设备投屏时发现第一电子设备的概率,降低投屏发现时长。
一种可能的实现中,第一电子设备执行信道监听时,若第一电子设备未连接无线访问接入点AP,第一电子设备在第一信道执行监听,其中,第一信道属于社交信道。这样,第一电子设备一直在第一信道循环监听,可以增加被发现的概率,缩短投屏时间。
一种可能的实现中,第一电子设备执行信道监听时,若第一电子设备连接第二信道的AP,第一电子设备在第二信道执行监听,其中,第二信道属于社交信道。这样,减少了频繁的信道切换,增加第一电子设备被发现的概率,缩短投屏时间,还提升了第一电子设备的上网体验。
一种可能的实现中,第一电子设备执行信道监听时,若第一电子设备连接第三信道的AP,第一电子设备在第三信道执行监听,其中,第三信道属于2.4GHz频段的非社交信道。这样,既减少了频繁的信道切换,又提升了第一电子设备的上网体验。
一种可能的实现中,第一电子设备执行信道监听时,若第一电子设备连接第四信道的AP,第一电子设备在第四信道和第五信道执行循环监听,其中,第四信道属于非社交信道,第五信道属于社交信道。这样,使得第一电子设备连接的网络不会断开,减少第一电子设备的界面卡顿。
一种可能的实现中,在第一时间段之前,还包括:第二电子设备接收到用于投屏的操作。这样,第二电子设备可以在用户想要投屏时开始执行信道扫描,从而减少执行不必要的设备发现过程。
第三方面,本申请实施例提供的设备发现方法,方法包括:
第一电子设备持续执行信道监听;第二电子设备进行设备发现时,第二电子设备在执行信道扫描后,循环执行信道监听和信道搜索,或者,第二电子设备在执行信道扫描后,持续执行信道搜索。这样,可以增加第一电子设备被发现的概率,降低投屏发现的时间,从而可以提升投屏体验。
一种可能的实现中,第一电子设备持续执行信道监听时,若第一电子设备未连接无线访问接入点AP,第一电子设备在第一信道持续执行信道监听,其中,第一信道属于社交信道。这样,第一电子设备一直在第一信道循环监听,可以增加被发现的概率,缩短投屏时间。
一种可能的实现中,第一电子设备持续执行信道监听时,若第一电子设备连接第二信道的AP,第一电子设备在第二信道持续执行信道监听,其中,第二信道属于社交信道。这样,减少了频繁的信道切换,增加第一电子设备被发现的概率,缩短投屏时间,还提升了第一电子设备的上网体验。
一种可能的实现中,第一电子设备持续执行信道监听时,若第一电子设备连接第三信 道的AP,第一电子设备在第三信道持续执行信道监听,其中,第三信道属于2.4GHz频段的非社交信道。这样,既减少了频繁的信道切换,又提升了第一电子设备的上网体验。
一种可能的实现中,第一电子设备持续执行信道监听时,若第一电子设备连接第四信道的AP,第一电子设备在第四信道和第五信道循环执行信道监听,其中,第四信道属于非社交信道,第五信道属于社交信道。这样,使得第一电子设备连接的网络不会断开,减少第一电子设备的界面卡顿。
第四方面,本申请实施例提供一种设备发现系统,该设备发现系统包括第一电子设备和第二电子设备。其中,第一电子设备用于执行第一方面或第一方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者用于执行第二方面或第二方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者用于执行第三方面或第三方面的任意一种可能的实现方式中第一电子设备所执行的方法。第二电子设备用于执行第一方面或第一方面的任意一种可能的实现方式中第二电子设备所执行的方法,或者用于执行第二方面或第二方面的任意一种可能的实现方式中第二电子设备所执行的方法,或者用于执行第三方面或第三方面的任意一种可能的实现方式中第二电子设备所执行的方法。
示例性的,第一电子设备用于执行信道监听,具体包括在第一信道执行监听,在第二信道执行监听,在第三信道执行监听,在第四信道和第五信道执行循环监听,在第六信道执行监听。
第一电子设备还用于从双天线工作切换到单天线工作,从单天线工作切换到双天线工作,还用于通过Wi-Fi管理帧通知AP。
第一电子设备还用于使用两根天线在第四信道与AP通信,使用两根天线在第四信道执行监听;还用于使用一根天线在第四信道与AP通信,使用另一根天线在第五信道执行监听;还用于使用两根天线在第六信道与AP通信,使用两根天线在第六信道执行监听。
第二电子设备用于执行信道扫描,执行信道搜索,在第二电子设备的工作信道执行任务。
第二电子设备还用于在第二电子设备的工作信道执行信道搜索,还用于在社交信道和第二电子设备的工作信道执行信道搜索。
第二电子设备还用于接收到用于投屏的操作。
第五方面,本申请实施例提供一种电子设备,包括处理器和存储器,存储器用于存储代码指令,处理器用于运行代码指令,以执行第一方面或第一方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第一方面或第一方面的任意一种可能的实现方式中第二电子设备所执行的方法;或者执行第二方面或第二方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第二方面或第二方面的任意一种可能的实现方式中第二电子设备所执行的方法;或者执行第三方面或第三方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第三方面或第三方面的任意一种可能的实现方式中第二电子设备所执行的方法。
第六方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行第一方面或第一方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第一方面或第一方面的任意一种可能的实现方式中第二电子设备所执行的方法;或者执行第二方面 或第二方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第二方面或第二方面的任意一种可能的实现方式中第二电子设备所执行的方法;或者执行第三方面或第三方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第三方面或第三方面的任意一种可能的实现方式中第二电子设备所执行的方法。
第七方面,本申请实施例提供一种包括计算机程序的计算机程序产品,当计算机程序在计算机上运行时,使得计算机执行第一方面或第一方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第一方面或第一方面的任意一种可能的实现方式中第二电子设备所执行的方法;或者执行第二方面或第二方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第二方面或第二方面的任意一种可能的实现方式中第二电子设备所执行的方法;或者执行第三方面或第三方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第三方面或第三方面的任意一种可能的实现方式中第二电子设备所执行的方法。
第八方面,本申请提供一种芯片或者芯片系统,该芯片或者芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以执行第一方面或第一方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第一方面或第一方面的任意一种可能的实现方式中第二电子设备所执行的方法;或者执行第二方面或第二方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第二方面或第二方面的任意一种可能的实现方式中第二电子设备所执行的方法;或者执行第三方面或第三方面的任意一种可能的实现方式中第一电子设备所执行的方法,或者执行第三方面或第三方面的任意一种可能的实现方式中第二电子设备所执行的方法。其中,芯片中的通信接口可以为输入/输出接口、管脚或电路等。
在一种可能的实现中,本申请中上述描述的芯片或者芯片系统还包括至少一个存储器,该至少一个存储器中存储有指令。该存储器可以为芯片内部的存储单元,例如,寄存器、缓存等,也可以是该芯片的存储单元(例如,只读存储器、随机存取存储器等)。
应当理解的是,本申请的第四方面至第八方面与本申请的第一方面或者第二方面或者第三方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
附图说明
图1为本申请实施例提供的一种电子设备的结构示意图;
图2为本申请实施例提供的一种电子设备的软件结构示意图;
图3为本申请实施例提供的一种无线Miracast投屏的使用场景示意图;
图4为本申请实施例提供的一种智能电视的无线投屏窗口的示意图;
图5为本申请实施例提供的一种基于Wi-Fi P2P协议的设备发现过程的示意图;
图6为本申请实施例提供的一种信道监听耗时的示意图;
图7为本申请实施例提供的一种设备发现过程对站点的数据传输影响的示意图;
图8为本申请实施例提供的一种设备发现方法的场景示意图;
图9为本申请实施例提供的另一种设备发现方法的场景示意图;
图10为本申请实施例提供的一种设备发现方法的扩展场景示意图;
图11为本申请实施例提供的一种设备发现方法的投屏源端改进的示意图;
图12为本申请实施例提供的另一种设备发现方法的投屏源端改进的示意图;
图13为本申请实施例提供的一种设备发现方法的示意图;
图14为本申请实施例提供的另一种设备发现方法的示意图;
图15为本申请实施例提供的再一种设备发现方法的示意图;
图16为本申请实施例提供的一种芯片的结构示意图。
具体实施方式
为了便于清楚描述本申请实施例的技术方案,以下,对本申请实施例中所涉及的部分术语和技术进行简单介绍:
1、社交信道:社交信道(social channel)包括2.4GHz频段的1信道、6信道和11信道,社交信道也可以称为常规信道。
2、2.4GHz频段的非社交信道:包括2.4GHz频段的2信道、3信道、4信道、5信道、7信道、8信道、9信道、10信道、12信道和13信道。
3、5GHz频段的信道:包括5GHz频段的36信道、40信道、44信道、48信道、52信道、56信道、60信道、64信道、149信道、153信道、157信道、161信道和165信道。
4、非社交信道:包括2.4GHz频段的非社交信道,以及5GHz频段的信道,非社交信道也可以称为非常规信道。
5、工作信道:工作信道(operating channel)可以理解为电子设备作为站点(station,STA)连接无线访问接入点(access point,AP)时的信道。工作信道也可以称为操作信道。
6、术语
在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一芯片和第二芯片仅仅是为了区分不同的芯片,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a--c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
7、电子设备
本申请实施例的电子设备也可以为任意形式的终端设备,例如,电子设备可以包括手持式设备、车载设备等。例如,一些电子设备为:手机(mobile phone)、平板电脑、掌上 电脑、笔记本电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备,虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的电子设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的电子设备等,本申请实施例对此并不限定。
作为示例而非限定,在本申请实施例中,该电子设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。
此外,在本申请实施例中,电子设备还可以是物联网(internet of things,IoT)系统中的电子设备,IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。
本申请实施例中的电子设备也可以称为:用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置等。
在本申请实施例中,电子设备或各个网络设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。该硬件层包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。该操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。
示例性的,图1示出了电子设备的结构示意图。
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器 180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备的具体限定。在本申请另一些实施例中,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从上述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-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接口等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备的结构限定。在本申请另一些实施例中,电子设备也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备的各种功能应用以及数据处理。例如,可以执行本申请实施例的方法。
天线1和天线2用于发射和接收电磁波信号。电子设备中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。
无线通信模块160可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如Wi-Fi网络),蓝牙(bluetooth,BT),全球导航卫星系统(global  navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。
其中,上述无线通信模块160可以包括Wi-Fi模块。该Wi-Fi模块可以用于传输数据。示例性的,该Wi-Fi模块的工作模式可以包括双频双发(dual band dual concurrent,DBDC)以及双频同步(dual band simultaneous,DBS)等。
DBDC是指电子设备可以支持两个工作频段,且可以同时使用两个工作频段进行Wi-Fi连接,例如2.4GHz频段和5GHz频段双发,电子设备可以在2.4GHz频段和5GHz频段上分别建立Wi-Fi连接。DBDC的设备可以有2根天线,1根天线可以给5GHz频段用,另1根天线可以给2.4GHz频段用。
DBS是指电子设备可以支持两个工作频段,且可以同时使用两个工作频段进行Wi-Fi连接,例如2.4GHz频段和5GHz频段双发,电子设备可以在2.4GHz频段和5GHz频段上分别建立Wi-Fi连接。DBS的设备可以有2根天线,2根天线可以给5GHz频段用,这2根天线也可以给2.4GHz频段用。
一些实现中,电子设备可以采用单输入单输出(single input single output,SISO)方式进行数据传输。示例性的,电子设备在基于Wi-Fi连接传输数据时,使用1根天线进行数据传输。例如,电子设备中的Wi-Fi模块分别在2.4GHz频段和5GHz频段建立Wi-Fi连接,且每条Wi-Fi连接使用1根天线进行数据传输。也就是说,电子设备使用1根天线在2.4GHz频段进行数据传输,使用另1根天线在5GHz频段进行数据传输,即1*1 2.4GHz+1*1 5GHz,其中,1*1中的第一个1表示1根发射天线,第二个1表示1根接收天线。可以理解,SISO方式相当于一条Wi-Fi连接对应1根天线,即对应一条数据流。
另一些实现中,电子设备可以采用多输入多输出(multiple input multiple output,MIMO)方式进行数据传输。示例性的,电子设备在基于Wi-Fi连接传输数据时,使用2根天线进行数据传输。例如,电子设备中的Wi-Fi模块在2.4GHz频段下使用两根天线进行数据传输,同时电子设备中的Wi-Fi模块还可以在5GHz频段下使用上述两根天线进行数据传输。也就是说,2*2 2.4GHz+2*2 5GHz,其中,2*2中的第一个2表示2根发射天线,第二个2表示2根接收天线。可以理解,MIMO方式相当于一条Wi-Fi连接对应2根天线,即对应两条数据流,两条数据流的传输速率可以是一条数据流的传输速率的两倍。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。在一些实施例中,电子设备可以包括1个或N个显示屏194,N为大于1的正整数。电子设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。例如本申请实施例中,智能电视的显示屏可以投屏显示手机界面的内容。
图2是本申请实施例的电子设备的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为五层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,硬件抽象层,以及内核层。
应用程序层可以包括一系列应用程序包。如图2所示,应用程序包可以包括视频、音乐、浏览器等应用程序。应用程序可以包括系统应用和三方应用。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图2所示,应用程序框架层可以包括窗口管理器、资源管理器、通知管理器、内容提供器和视图系统等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏、锁定屏幕、触摸屏幕、拖拽屏幕、截取屏幕等。
资源管理器为应用程序提供各种资源,例如本地化字符串、图标、图片、布局文件、视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。通知管理器还可以是以对话窗口形式出现在屏幕上的通知。
内容提供器用于在不同的应用程序之间实现数据共享的功能,允许一个程序访问另一个程序中的数据,同时还能保证被访问的数据的安全性。
视图系统可以负责应用程序的界面绘制和事件处理。
Android runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。例如本申请实施例中,虚拟机可以用于执行电子设备的投屏显示、基于Wi-Fi P2P协议的设备发现的过程等功能。
系统库也可以称为Native层,Native层可以包括多个功能模块。例如:媒体库(media libraries)、函数库(function libraries)、图形处理库(例如:OpenGL ES)等。
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
函数库为开发者提供多种服务的API接口,方便开发者快速集成并实现各种功能。
图形处理库用于实现三维图形绘图、图像渲染、合成和图层处理等。
硬件抽象层是介于内核层和Android runtime之间的抽象出来的一层结构。硬件抽象层可以是对硬件驱动的一个封装,为上层应用的调用提供统一接口。例如本申请实施例中,硬件抽象层可以包括Wpa_supplicant模块,该Wpa_supplicant模块可以用于执行Wi-Fi P2P协议的监听、扫描等的逻辑控制。
内核层是硬件和软件之间的层。内核层可以包括Wi-Fi驱动、显示驱动、音频驱动、蓝牙驱动等。例如本申请实施例中,Wi-Fi驱动可以用于对信道进行扫描、监听或搜索等处理。
需要说明的是,本申请实施例仅以安卓系统举例来说明,在其他操作系统中(例如Windows系统,IOS系统等),只要各个功能模块实现的功能和本申请的实施例类似,也能实现本申请的方案。
随着电子技术的发展,一些电子设备支持无线Miracast投屏。在无线Miracast投屏的应用场景中,支持Wi-Fi P2P协议的电子设备A可以与支持Wi-Fi P2P协议的电子设备B进行配对。在两个电子设备配对成功后,两个电子设备之间可以进行数据传输,从而使得电子设备A的屏幕内容可以投屏到电子设备B的界面上。其中,Wi-Fi对等网络协议也可以称为Wi-Fi点对点协议或Wi-Fi端对端协议。电子设备A也可以称为投屏源端,电子设备B也可以称为投屏显示端。
下面以电子设备A为手机,电子设备B为智能电视为例,示例性说明无线Miracast投屏的使用场景。
图3的a为手机的下拉菜单界面300,下拉菜单界面300中可以包括多个功能开关,例如网络开关、蓝牙开关、手电筒开关等,下拉菜单界面300还可以包括无线投屏开关301。其中,无线投屏也可以称为手机投屏、智慧投屏等。
当用户点击无线投屏开关301时,手机可以显示如图3的b的界面302,同时手机可以发现附近可以投屏的设备。界面302可以显示无线投屏对话框303,该无线投屏对话框303可以包括提示信息、取消按钮和查看帮助按钮,其中,提示信息可以包括“正在搜索可用设备…”,取消按钮可以用于取消无线投屏,查看帮助按钮可以用于查看无线投屏相关的帮助信息。
当手机发现附近可用的投屏设备后,可以显示如图3的c的界面304,界面304可以显示可用设备对话框305。该可用设备对话框305可以包括可用设备列表、取消按钮和查看帮助按钮,其中,可用设备列表可以包括可用设备图标和可用设备名称,取消按钮可以用于取消无线投屏,查看帮助按钮可以用于查看无线投屏相关的帮助信息。
例如当用户选择可用设备1后,如图4所示,可用设备1可以为智能电视,智能电视的界面400中可以显示无线投屏窗口401。可以理解的是,智能电视显示无线投屏窗口401时,用户无法继续观看视频播放等,因此用户可能会不感知智能电视的界面卡顿,从而提升用户体验。
该无线投屏窗口401可以包括提示信息、接受按钮和取消按钮,其中,提示信息可以包括“XX设备想要投屏,是否接受”,接受按钮可以用于接受手机的投屏请求,取消按钮可以用于取消手机的投屏请求。当用户触发接受按钮时,手机的屏幕内容可以投屏到智能电视的界面上,当用户触发取消按钮时,手机的屏幕内容则无法投屏到智能电视的界面上。
可能的实现中,当用户触发接受按钮时,智能电视可以和手机建立信任连接,在下次该手机想要选择该智能电视进行投屏时,智能电视的界面400中可以不显示投屏窗口401,就可以将手机的屏幕内容显示到智能电视的界面上。
可以理解的是,上述手机发现智能电视的过程是基于Wi-Fi P2P协议实现的。其中,基于Wi-Fi P2P协议的设备发现过程可以实现两个设备之间的相互发现,因此,手机和智能电视均可以执行基于Wi-Fi P2P协议的设备发现过程。
下面以智能电视为P2P设备1为例,图5示出了基于Wi-Fi P2P协议的设备发现过程。
当智能电视开始发现时,智能电视可以进行全信道扫描,此时,智能电视处于扫描(scan)状态,该扫描状态处于Wi-Fi P2P协议中的扫描阶段。全信道扫描可以通过在2.4GHz频段的信道和5GHz频段的信道发送探测请求(probe request)进行设备扫描。
智能电视完成全信道扫描之后,可以进入监听(listen)状态。智能电视每次处于监听 状态的时间可以在100/200/300的时间单元(time unit,TU)随机选择。智能电视可以选择社交信道中的任一信道作为所要监听的信道。可以理解的是,当智能电视选定某个信道后,后续所监听的信道不会再变。当智能电视下次重新开始发现的时候,智能电视可以重新选择社交信道中的任一信道作为所要监听的信道。当智能电视处于监听状态时,该智能电视可以被P2P设备2发现。为了便于描述,后续将手机作为P2P设备2进行描述。
在监听状态之后,智能电视可以进入搜索(search)状态。智能电视可以在社交信道的每个信道上进行搜索。当智能电视处于搜索状态时,智能电视可以发现处于监听状态的手机。
可以理解的是,后续智能电视可以在监听状态和搜索状态循环执行。例如在搜索状态之后,智能电视可以再次进入监听状态,在监听状态之后,智能电视还可以再次进入搜索状态。其中,该监听状态和搜索状态均处于Wi-Fi P2P协议中的发现阶段。
如图5所示,智能电视第一次处于监听状态时,所监听的信道为2.4GHz频段的1信道,监听时间为200TU。智能电视第二次处于监听状态时,所监听的信道仍然为1信道,监听时间可以为100TU。当某个手机处于扫描状态,且扫描到1信道时,则手机可以发现智能电视,或者,当某个手机处于搜索状态,且扫描到1信道时,则手机可以发现智能电视。也就是说,手机想要发现智能电视,手机需要处于扫描状态或搜索状态,智能电视需要处于监听状态,且手机所扫描或搜索的信道与智能电视所监听的信道为同一个信道。然而,这样的发现过程使得智能电视被发现的时间较长,降低了用户体验。
可能的场景中,如图6所示,智能电视开始发现后可以进行全信道扫描,例如智能电视扫描26个信道时可以耗时3.4s左右。在完成全信道扫描之后,智能电视可以切换到监听状态,例如智能电视可以在6信道监听307毫秒(ms)。在监听状态之后,智能电视可以切换到工作信道,例如,工作信道可以为5GHz频段的149信道,智能电视可以在工作信道与AP进行数据通信,从而使得智能电视与AP间的网络不会断开。智能电视在工作信道延时50ms后,可以切换到搜索状态,例如智能电视可以在社交信道上搜索626ms。
之后,智能电视还可以重新切换到监听状态,并循环执行上述过程。其中,不同的电子设备在工作信道的延时时长可以不同,例如有些电子设备在工作信道的延时时长可以为100ms左右,本申请实施例对电子设备在工作信道的具体延时时长不作限定。
可以理解的是,上述图6所示的每一次循环流程的耗时可以有900多毫秒。其中,在这900多毫秒中,只有307ms智能电视处于可以被手机发现的状态,这使得智能电视被发现较为困难,增加了智能电视被发现的时长。并且在这900多毫秒中,只有50ms智能电视可以与AP通信,这使得智能电视的网络变差,降低用户体验。
在上述图6所示的智能电视切换到工作信道的过程中,若智能电视作为STA连接非社交信道的AP,则基于Wi-Fi P2P协议的智能电视被发现的过程可以对站点的数据传输造成较大的影响。下面图7以智能电视连接路由器的5GHz频段的149信道为例进行说明。
如图7所示,智能电视与路由器间的数据传输速率在350Mbps左右,传输速率相对较高。然而,在21秒左右时,由于智能电视想要被手机发现,因此智能电视需要从5GHz频段的149信道切换到2.4GHz频段的社交信道进行监听。这时,智能电视与路由器间的数据传输速率可能会降到70Mbps左右,传输速率相对较低,可能会出现智能电视的界面卡顿。因此,基于Wi-Fi P2P协议的智能电视被发现的过程可以对站点的数据传输造成较 大的影响。
有鉴于此,本申请实施例提供的设备发现方法,在无线Miracast投屏的设备发现过程中,由于智能电视不需要发现手机,因此在基于Wi-Fi P2P协议的设备发现过程中,智能电视可以不需要切换到扫描状态或搜索状态,智能电视处于监听状态就可以被手机发现。这样,智能电视可以较长时间处于监听状态,增加智能电视被发现的概率,降低投屏发现的时间,从而可以提升投屏体验。
可能的实现中,本申请实施例的设备发现方法可以包括下述三种情况:
情况1:如果智能电视STA未连接AP,智能电视在社交信道随机选择一个信道进行Wi-Fi P2P的循环监听。
如图8所示,以智能电视选择2.4GHz频段的1信道作为监听信道为例,智能电视在开始发现后,可以一直在1信道循环监听,这样,可以增加智能电视被发现的概率,缩短投屏时间。
可以理解的是,在智能电视STA未连接AP时,智能电视可以在开机时开始执行基于Wi-Fi P2P协议的设备发现过程,这样,智能电视一直处于被发现状态,可以随时被其他设备发现,而不需要用户进行复杂的操作,从而提升用户体验。或者,智能电视可以在进入无线投屏窗口时开始执行基于Wi-Fi P2P协议的设备发现过程,这样,智能电视可以在用户想要投屏时开始处于被发现状态,减少执行不必要的设备发现过程。
情况2:如果智能电视STA连接在社交信道的AP,智能电视在智能电视STA所连接的信道进行Wi-Fi P2P的循环监听。
也就是说,在基于Wi-Fi P2P协议的设备发现过程中,如果智能电视STA连接在社交信道的AP,说明智能电视STA的工作信道为社交信道中的某个信道,智能电视不需要执行信道的切换,则智能电视可以将所连接的社交信道作为监听状态下智能电视所监听的信道。
例如,以智能电视STA连接在AP的2.4GHz频段的1信道上为例,则情况2可以如上述图8所示,智能电视在开始发现后,可以一直在1信道循环监听。这样,智能电视既可以在1信道上与AP进行数据交互,又可以处于被发现状态,从而减少了频繁的信道切换,增加智能电视被发现的概率,缩短投屏时间,还提升了智能电视的上网体验。
情况3:如果智能电视STA连接非社交信道的AP,则智能电视在社交信道和智能电视STA工作信道进行Wi-Fi P2P的循环监听。可选的,如果智能电视STA连接2.4G非社交信道的AP,智能电视也可以在智能电视STA的工作信道进行Wi-Fi P2P的循环监听。
也就是说,在基于Wi-Fi P2P协议的设备发现过程中,如果智能电视STA连接在非社交信道的AP,说明社交信道和智能电视STA的工作信道不在同一个信道。例如,智能电视STA的工作信道为5GHz频段的149信道,社交信道为2.4GHz频段的1信道,这时,智能电视可以在社交信道和智能电视STA的工作信道进行循环监听。
如果智能电视STA连接2.4G非社交信道的AP,说明社交信道和智能电视STA的工作信道不在同一个信道。例如,智能电视STA的工作信道为2.4GHz频段的3信道,社交信道为2.4GHz频段的1信道,这时,智能电视可以在3信道进行循环监听。当手机进行全信道扫描时,由于智能电视一直处于3信道不变,则手机较大概率可以扫描到智能电视。这样,智能电视既可以在3信道上与AP进行数据交互,也可以处于被发现状态,既减少 了频繁的信道切换,又提升了智能电视的上网体验。
如图9所示,智能电视在开始发现后,可以在2.4GHz频段的1信道上监听10ms,在工作信道上监听90ms,然后继续在1信道上监听10ms,在工作信道上监听90ms,依次循环监听。这样,智能电视既可以在一段时间内处于监听状态,使得智能电视可以被发现,还可以在大部分时间内处于与AP的通信状态,使得智能电视连接的网络不会断开,减少智能电视的界面卡顿。
可选的,如图10所示,在一个周期中,智能电视也可以先在工作信道上监听,再在2.4GHz频段的1信道上监听,本申请实施例不作限定。例如,智能电视在开始发现后,可以先在工作信道上监听90ms,然后在1信道上监听10ms,然后继续在工作信道上监听90ms,在1信道上监听10ms,依次循环监听。
可以理解的是,智能电视在社交信道上监听一段时间是有必要的。这时由于若智能电视STA连接5GHz频段的AP,且只在工作信道进行监听,则会使得只支持2.4G频段的手机无法发现智能电视。此外,若手机在扫描阶段没有发现智能电视,手机会在社交信道进行扫描,若智能电视只在工作信道进行监听,则会使得手机发现不了智能电视。因此,智能电视在社交信道上监听一段时间可以使得提升智能电视被发现的概率。
可以理解的是,智能电视在社交信道上的监听时间和在工作信道上的监听时间可以由智能电视预先设置。其中,在社交信道上的监听时间与在工作信道上的监听时间可以相等,也可以不等,本申请实施例不作限定。
经过实验测试得知,在上述情况3中,当智能电视STA连接5GHz频段的AP时,智能电视在STA工作信道监听90ms,在社交信道监听10ms,可以概率出现手机发现智能电视的时长为10s左右,非首次投屏时手机连接智能电视的时长为3s左右的情况。
下述表1、表2、表3分别为在社交信道监听时长与STA工作信道监听时长配比不同的情况下,手机发现智能电视的时长数据和手机连接智能电视的时长数据。其中,双频手机可以理解为既支持5G,又支持2.4G的手机,2.4G only手机可以理解为只支持2.4G的手机。
表1:
表2:
表3:

此外,经过实验测试还可以得知,智能电视STA连接5GHz频段的AP时,设备投屏的发现过程会对智能电视STA与AP交互的速率有影响。如下述表4所示,智能电视STA一直连接AP时,交互速率在296Mbps左右,当智能电视在社交信道监听时长与STA工作信道监听时长比为50:450时,交互速率下降为237Mbps左右。
表4:
从上述的实验数据可以得知,社交信道监听时长与STA工作信道监听时长的比值不能太大,也不能太小。若社交信道监听时长与STA工作信道监听时长的比值太大,例如智能电视一直在社交信道监听,不在工作信道监听,则智能电视和路由器的网络连接可能会断开,使得网络速率掉零,用户上网体验变差。若社交信道监听时长与STA工作信道监听时长的比值太小,例如智能电视一直在工作信道监听,不在社交信道监听,则只支持2.4G频段的手机可能不易发现或发现不了智能电视。为了使得智能电视连接的网络不会断开,智能电视可以设定在工作信道上的监听时间大于在社交信道上的监听时间,这样可以在不影响用户观看智能电视的前提下使得智能电视被发现。
此外,在确定社交信道上的监听时间与工作信道上的监听时间时,还可以考虑信道切换时长、单信道的扫描时间、业务的时延要求等其他因素的影响。
例如,若信道切换时长为140ms左右,则智能电视在1信道上监听10ms,在工作信道上监听90ms就不太合适。因为这种情况下,在一个监听循环中,10ms用于监听被发现,140ms用于切换信道,90ms用于连接网络,也就是说,240ms里有140ms既不能用于被发现,也不能传输数据。因此,若信道切换时长较长,则智能电视在1信道上的监听时间和在工作信道上的监听时间应分别设置的相对较长。
此外,若单信道的扫描时间为40ms左右,由于期望手机在信道扫描时能发现智能电视,所以智能电视在监听信道上的监听时间可以大于40ms。这样,智能电视被手机发现的概率相对较大。
综上,社交信道监听时长与STA工作信道监听时长的比值需要进行折中考虑,这样才能降低发现和连接智能电视的时长,还能使得上网速率下降的不明显,从而既能提高投屏体验,又能提升用户上网体验。
针对上述智能电视连接5GHz频段的AP时影响上网速率等的不足,本申请实施例可以根据智能电视的芯片规格选择不同的监听方式。
监听方式1:如果智能电视支持DBDC,则可以实现2.4G和5G各使用1根天线并发工作。
也就是说,如果智能电视支持DBDC,在智能电视进行Wi-Fi P2P的循环监听时,智能电视可以保留1根天线在站点工作,将另1根天线切换到社交信道上进行循环监听。这样,可以使得智能电视在Wi-Fi P2P的监听状态时,智能电视STA的网络速率不会掉零。
一种可能的场景中,智能电视基于Wi-Fi P2P协议进行循环监听时,在每个周期内,智能电视可以先在STA工作信道监听一段时间,然后在社交信道监听一段时间。当智能电视在STA工作信道监听结束后需要切换到社交信道进行监听时,智能电视STA可以通过 Wi-Fi管理帧等方式通知AP,当前智能电视要从双天线工作切换到单天线工作,进而智能电视可以使用1根天线在社交信道进行Wi-Fi P2P的循环监听。其中,本申请实施例对Wi-Fi管理帧的具体实现方式不作限定。
当智能电视完成Wi-Fi P2P的循环监听后,智能电视STA还可以通过Wi-Fi管理帧等通知AP,当前智能电视要从单天线切换到双天线工作。可以理解的是,智能电视通过Wi-Fi管理帧等通知AP,可以使得智能电视在切换天线之后,不会影响智能电视与AP之间的数据发送和接收。
另一种可能的场景中,受限于用户带宽、芯片通信接口等的限制,虽然智能电视支持2*2MIMO,但实际上使用1根天线SISO就可以实现上网的最大速率。例如2*2MIMO的理论速率为866Mbps,1*1SISO的理论速率为433Mbps,某个智能电视虽然支持2*2MIMO,然而实际测试速率最高为296Mbps。也就是说,智能电视使用1根天线SISO就够用了。这时,另1根天线可以用进行Wi-Fi P2P的循环监听。这样,既可以满足用户的上网体验,也可以实现投屏的快速发现。
监听方式2:若智能电视支持DBS,则可以实现2.4G和5G各使用两根天线工作。
也就是说,智能电视STA可以以MIMO的方式使用2根天线和AP进行通信,还可以使用这2根天线进行Wi-Fi P2P的循环监听。这样,智能电视既可以与AP通信,又可以一直在社交信道进行循环监听,使得在智能电视STA的上网速率不降低的同时,还加快了投屏的发现。
需要说明的是,上述实施例中的设备发现方法均是针对投屏显示端的智能电视所做的改进。此外,在无线Miracast投屏场景中,投屏源端的手机也可以进行一些改进。
改进1:在无线Miracast投屏场景中,由于手机只需要发现智能电视,而不需要被智能电视发现,因此,手机可以不需要切换到监听状态,只需要保留扫描状态和搜索状态就可以发现智能电视。这样,可以降低投屏时间,提升用户体验。
改进2:一些无线Miracast投屏场景中,手机离智能电视的距离较近,手机和智能电视会较大概率连接同一个AP,也就是说,手机STA和智能电视STA较大概率在同一个信道上。因此,可以将Wi-Fi P2P协议中的监听状态替换为在手机STA的工作信道进行扫描的扫描状态。这样,可以提高手机投屏时发现智能电视的概率,降低投屏发现时长。
如图11所示,以手机连接5GHz频段的149信道的AP为例,手机在开始发现后可以进行全信道进行扫描,例如手机扫描26个信道时可以耗时3.4s左右。在完成全信道扫描之后,手机可以在手机STA的工作信道进行扫描,例如手机可以在149信道扫描307ms,且手机还可以在工作信道延时50ms左右,这样可以使得手机与AP间的网络不会断开。手机在工作信道延时50ms后,可以切换到搜索状态,例如手机可以在社交信道上搜索626ms。
之后,手机还可以重新切换到手机STA的工作信道,并循环执行上述过程。其中,不同的电子设备在工作信道的延时时长可以不同,本申请实施例对电子设备在工作信道的具体延时时长不作限定。
改进3:在Wi-Fi P2P协议中,手机在搜索状态进行信道扫描时,除了对社交信道进行搜索,还可以对手机STA的工作信道进行搜索。也就是说,手机在搜索状态所扫描的信道可以包括:2.4GHz频段的1信道、2.4GHz频段的6信道、2.4GHz频段的11信道,以及手机STA的工作信道。这样,可以提高手机投屏时发现智能电视的概率,降低投屏发现时 长。
如图12所示,以手机连接5GHz频段的149信道的AP为例,手机在开始发现后可以进行全信道进行扫描。在完成全信道扫描之后,手机可以切换到工作信道,使得手机与AP间的网络不会断开。手机在工作信道延时50ms后,可以切换到搜索状态,例如手机可以在社交信道和手机STA的工作信道上搜索626ms。
之后,手机还可以重新切换到手机STA的工作信道,并循环执行上述过程。其中,不同的电子设备在工作信道的延时时长可以不同,本申请实施例对电子设备在工作信道的具体延时时长不作限定。
可能的实现中,通过获取电子设备某个信道的空口信息来确定是否执行本申请实施例的设备发现方法。
例如,以投屏显示端为智能电视,且获取智能电视的1信道的空口信息为例,若未执行本申请实施例的设备发现方法,则空口信息中可以查询到智能电视处于扫描状态时在1信道发送的探测请求,和/或智能电视处于搜索状态时在1信道发送的探测请求。此外,还可能查询到对方设备回复的探测响应(probe response)。
若执行本申请实施例的设备发现方法,则空口信息中查询不到智能电视处于扫描状态时在1信道发送的探测请求,和/或智能电视处于搜索状态时在1信道发送的探测请求。此外,也查询不到对方设备回复的探测响应。
下面通过具体的实施例对本申请实施例的方法进行详细说明。下面的实施例可以相互结合或独立实施,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
图13示出了本申请实施例的设备发现方法。方法包括:
S1301、第一时间段,第一电子设备执行信道监听,第二电子设备执行信道扫描。
本申请实施例中,第一电子设备可以理解为无线投屏场景中的投屏显示端,例如第一电子设备可以理解为上述实施例中的智能电视。第二电子设备可以理解为无线投屏场景中的投屏源端,例如第二电子设备可以理解为上述实施例中的手机。
第一时间段可以理解为第二电子设备执行信道扫描的时间段,也可以理解为第二电子设备执行信道扫描的时长。可以理解的是,第一电子设备执行信道监听的时长和第二电子设备执行信道扫描的时长可以相同,也可以不同。
信道监听可以理解为上述图5对应的实施例中电子设备处于监听(listen)状态时对信道的监听。信道扫描可以理解为上述图5对应的实施例中电子设备处于扫描(scan)状态时对信道的监听。
S1302、第二时间段,第一电子设备执行信道监听,第二电子设备执行信道监听。
本申请实施例中,第二时间段可以理解为第二电子设备执行信道监听的时间段,也可以理解为第二电子设备执行信道监听的时长。可以理解的是,第一电子设备执行信道监听的时长和第二电子设备执行信道监听的时长可以相同,也可以不同。
S1303、第三时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索。
本申请实施例中,第三时间段可以理解为第二电子设备执行信道搜索的时间段,也可以理解为第二电子设备执行信道搜索的时长。可以理解的是,第一电子设备执行信道监听的时长和第二电子设备执行信道搜索的时长可以相同,也可以不同。
信道搜索可以理解为上述图5对应的实施例中电子设备处于搜索(search)状态时对 信道的监听。
可以理解的是,本申请实施例中的信道监听、信道扫描和信道搜索均为泛指,也就是说,第一电子设备所执行的信道监听与第二电子设备所执行的信道监听分别为各自不同的执行过程,此外,第二电子设备在不同的时间段所执行的信道监听也可以有区别,例如,第二电子设备在不同的时间段所监听的信道可以不同;第二电子设备在不同的时间段所执行的信道搜索也可以有区别,例如,第二电子设备在不同的时间段所搜索的信道可以不同。
S1304、第四时间段,第一电子设备执行信道监听,第二电子设备执行信道监听。
本申请实施例中,第四时间段可以理解为第二电子设备执行信道监听的时间段,也可以理解为第二电子设备执行信道监听的时长。可以理解的是,第四时间段的时长和第二时间段的时长可以相同,也可以不同。
S1305、第五时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索;其中,第一时间段与第二时间段连续,第二时间段与第三时间段连续,第三时间段与第四时间段连续,第四时间段与第五时间段连续。
本申请实施例中,第五时间段可以理解为第二电子设备执行信道搜索的时间段,也可以理解为第二电子设备执行信道搜索的时长。可以理解的是,第五时间段的时长和第三时间段的时长可以相同,也可以不同。在设备发现过程中,第一电子设备可以不需要切换到扫描状态或搜索状态,第一电子设备处于监听状态就可以被第二电子设备发现。这样,第一电子设备可以较长时间处于监听状态,增加第一电子设备被发现的概率,降低投屏发现的时间,从而可以提升投屏体验。
可选的,在图13对应的实施例的基础上,第一电子设备执行信道监听时,若第一电子设备未连接无线访问接入点AP,第一电子设备在第一信道执行监听,其中,第一信道属于社交信道。
本申请实施例中,第一信道可以为2.4GHz频段的1信道、6信道或11信道。
在设备发现过程中,对于第一电子设备未连接无线访问接入点AP的情况,可以参照上述实施例中情况1的相关描述,以及上述图8对应实施例中的相关描述,不再赘述。第一电子设备一直在第一信道循环监听,可以增加被发现的概率,缩短投屏时间。
可选的,在图13对应的实施例的基础上,第一电子设备执行信道监听时,若第一电子设备连接第二信道的AP,第一电子设备在第二信道执行监听,其中,第二信道属于社交信道。
本申请实施例中,第二信道可以为2.4GHz频段的1信道、6信道或11信道。
在设备发现过程中,对于第一电子设备连接第二信道的AP的情况,可以参照实施例中情况2的相关描述,不再赘述。
这样,第一电子设备既可以在1信道上与AP进行数据交互,又可以处于被发现状态,从而减少了频繁的信道切换,增加第一电子设备被发现的概率,缩短投屏时间,还提升了第一电子设备的上网体验。
可选的,在图13对应的实施例的基础上,第一电子设备执行信道监听时,若第一电子设备连接第三信道的AP,第一电子设备在第三信道执行监听,其中,第三信道属于2.4GHz频段的非社交信道。
本申请实施例中,第三信道可以为2.4GHz频段的2信道、3信道、4信道、5信道、7 信道、8信道、9信道、10信道、12信道或13信道。
如果第一电子设备连接2.4G非社交信道的AP,说明社交信道和第一电子设备的工作信道不在同一个信道。第一电子设备在第三信道进行循环监听,第一电子设备可以较大概率被扫描到。这样,第一电子设备既可以在第三信道上与AP进行数据交互,也可以处于被发现状态,既减少了频繁的信道切换,又提升了第一电子设备的上网体验。
可选的,在图13对应的实施例的基础上,第一电子设备执行信道监听时,若第一电子设备连接第四信道的AP,第一电子设备在第四信道和第五信道执行循环监听,其中,第四信道属于非社交信道,第五信道属于社交信道。
本申请实施例中,在设备发现过程中,对于第一电子设备连接第四信道的AP的情况,可以参照实施例中情况3的相关描述,不再赘述。
这样,第一电子设备既可以在一段时间内处于监听状态,使得第一电子设备可以被发现,还可以在大部分时间内处于与AP的通信状态,使得第一电子设备连接的网络不会断开,减少第一电子设备的界面卡顿。
可选的,在图13对应的实施例的基础上,第一电子设备支持双频双发DBDC工作模式,第一电子设备在第四信道和第五信道执行循环监听时,若第一电子设备从第四信道切换到第五信道执行监听,第一电子设备从双天线工作切换到单天线工作;若第一电子设备从第五信道切换到第四信道执行监听,第一电子设备从单天线工作切换到双天线工作。
本申请实施例中,在第一电子设备支持双频双发DBDC工作模式的场景中,第一电子设备在双天线工作和单天线工作之间的切换可以参考上述实施例中的监听方式1的相关描述,不再赘述。第一电子设备在双天线工作和单天线工作之间的切换,可以使得第一电子设备在Wi-Fi P2P的监听状态时,第一电子设备的网络速率不会掉零。
可选的,在图13对应的实施例的基础上,第一电子设备从双天线工作切换到单天线工作时,第一电子设备通过Wi-Fi管理帧通知AP第一电子设备从双天线工作切换到单天线工作;第一电子设备从单天线工作切换到双天线工作时,第一电子设备通过Wi-Fi管理帧通知AP第一电子设备从单天线工作切换到双天线工作。
本申请实施例中,在第一电子设备支持双频双发DBDC工作模式的场景中,第一电子设备通过Wi-Fi管理帧通知AP可以参考上述实施例中的监听方式1的相关描述,不再赘述。
可以理解的是,图13对应的实施例中的AP为泛指,也就是说,第一电子设备在不同时间段所连接的AP可以不是同一个AP。
第一电子设备通过Wi-Fi管理帧等方式通知AP,可以使得第一电子设备在切换天线之后,不会影响第一电子设备与AP之间的数据发送和接收。
可选的,在图13对应的实施例的基础上,第一电子设备支持双频双发DBDC工作模式,第一电子设备在第四信道和第五信道执行循环监听时,若第一电子设备在第四信道执行监听,第一电子设备使用两根天线在第四信道与AP通信,使用两根天线在第四信道执行监听;若第一电子设备在第五信道执行监听,第一电子设备使用一根天线在第四信道与AP通信,使用另一根天线在第五信道执行监听。
本申请实施例中,在第一电子设备支持双频双发DBDC工作模式的场景中,第一电子设备在第四信道和第五信道执行循环监听可以参考上述实施例中的监听方式1的相关描述, 不再赘述。第一电子设备在第四信道和第五信道执行循环监听,既可以满足用户的上网体验,也可以实现投屏的快速发现。
可选的,在图13对应的实施例的基础上,第一电子设备支持双频同步DBS工作模式,第一电子设备执行信道监听时,若第一电子设备连接第六信道的AP,第一电子设备使用两根天线在第六信道与AP通信,使用这两根天线在第六信道执行监听,其中,第六信道属于5GHz频段的信道。
本申请实施例中,在第一电子设备支持双频同步DBS工作模式的场景中,第一电子设备连接第六信道的AP可以参考上述实施例中的监听方式2的相关描述,不再赘述。第一电子设备既可以与AP通信,又可以一直在社交信道进行循环监听,使得在第一电子设备的上网速率不降低的同时,还加快了投屏的发现。
可选的,在图13对应的实施例的基础上,在第一时间段之前,还可以包括:第二电子设备接收到用于投屏的操作。
本申请实施例中,用于投屏的操作可以包括用户点击投屏按钮的操作、用户语音输入的投屏触发操作等,本申请实施例不作限定。投屏按钮例如可以为上述图3对应的实施例中的无线投屏开关301。
第二电子设备在接收到用于投屏的操作之后执行信道扫描,这样,第二电子设备可以在用户想要投屏时开始执行信道扫描,从而减少执行不必要的设备发现过程。
图14示出了本申请实施例的设备发现方法。方法包括:
S1401、第一时间段,第一电子设备执行信道监听,第二电子设备执行信道扫描。
本申请实施例中,第一电子设备和第二电子设备可以参照上述图13对应的实施例的步骤S1301中的相关描述,不再赘述。
第一时间段可以理解为第二电子设备执行信道扫描的时间段,也可以理解为第二电子设备执行信道扫描的时长。可以理解的是,第一电子设备执行信道监听的时长和第二电子设备执行信道扫描的时长可以相同,也可以不同。
信道监听、信道扫描可以参照上述图13对应的实施例的步骤S1301中的相关描述,不再赘述。
S1402、第二时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索。
本申请实施例中,第二时间段可以理解为第二电子设备执行信道搜索的时间段,也可以理解为第二电子设备执行信道搜索的时长。可以理解的是,第一电子设备执行信道监听的时长和第二电子设备执行信道搜索的时长可以相同,也可以不同。
信道搜索可以参照上述图13对应的实施例的步骤S1301中的相关描述,不再赘述。
S1403、第三时间段,第一电子设备执行信道监听,第二电子设备在第二电子设备的工作信道执行任务。
本申请实施例中,第三时间段可以理解为第二电子设备在第二电子设备的工作信道执行任务的时间段,也可以理解为第二电子设备在第二电子设备的工作信道执行任务的时长。可以理解的是,第一电子设备执行信道监听的时长和第二电子设备在第二电子设备的工作信道执行任务的时长可以相同,也可以不同。
S1404、第四时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索。
本申请实施例中,第四时间段可以理解为第二电子设备执行信道搜索的时间段,也可 以理解为第二电子设备执行信道搜索的时长。可以理解的是,第四时间段的时长和第二时间段的时长可以相同,也可以不同。
S1405、第五时间段,第一电子设备执行信道监听,第二电子设备在第二电子设备的工作信道执行任务。
本申请实施例中,第五时间段可以理解为第二电子设备在第二电子设备的工作信道执行任务的时间段,也可以理解为第二电子设备在第二电子设备的工作信道执行任务的时长。可以理解的是,第五时间段的时长和第三时间段的时长可以相同,也可以不同。
S1406、第六时间段,第一电子设备执行信道监听,第二电子设备执行信道搜索;其中,第一时间段与第二时间段连续,第二时间段与第三时间段连续,第三时间段与第四时间段连续,第四时间段与第五时间段连续,第五时间段与第六时间段连续。
本申请实施例中,第六时间段可以理解为第二电子设备执行信道搜索的时间段,也可以理解为第二电子设备执行信道搜索的时长。可以理解的是,第六时间段的时长和第四时间段的时长可以相同,也可以不同。
可以理解的是,在图14对应的实施例中,可以不执行第三时间段和第五时间段对应的执行步骤。也就是说,第二时间段可以与第四时间段连续,第四时间段可以与第六时间段连续。
在设备发现过程中,第一电子设备可以不需要切换到扫描状态或搜索状态,第一电子设备处于监听状态就可以被第二电子设备发现。第二电子设备可以不需要切换到监听状态,只需要保留扫描状态和搜索状态就可以发现第一电子设备。这样,可以降低投屏时间,提升用户体验。
可选的,在图14对应的实施例的基础上,在第二时间段,第二电子设备在第二电子设备的工作信道执行信道搜索,在第四时间段,第二电子设备在社交信道执行信道搜索,在第六时间段,第二电子设备在第二电子设备的工作信道执行信道搜索。
本申请实施例中,第二电子设备在第二电子设备的工作信道执行信道搜索,或者在社交信道执行信道搜索可以参照上述实施例对应的改进2中的相关描述,以及上述图11对应的实施例中的相关描述,不再赘述。
本申请实施例将设备发现过程中的监听状态替换为在第二电子设备的工作信道进行扫描的扫描状态,可以提高第二电子设备投屏时发现第一电子设备的概率,降低投屏发现时长。
可选的,在图14对应的实施例的基础上,第二电子设备在社交信道和第二电子设备的工作信道执行信道搜索。
本申请实施例中,第二电子设备在社交信道和第二电子设备的工作信道执行信道搜索可以参照上述实施例对应的改进3中的相关描述,以及上述图12对应的实施例中的相关描述,不再赘述。
第二电子设备在搜索状态进行信道扫描时,除了对社交信道进行搜索,还可以对第二电子设备的工作信道进行搜索。这样,可以提高第二电子设备投屏时发现第一电子设备的概率,降低投屏发现时长。
可选的,在图14对应的实施例的基础上,第一电子设备执行信道监听时,若第一电子设备未连接无线访问接入点AP,第一电子设备在第一信道执行监听,其中,第一信道 属于社交信道。
本申请实施例中,在设备发现过程中,对于第一电子设备未连接无线访问接入点AP的情况,可以参照上述实施例中情况1的相关描述,以及上述图8对应实施例中的相关描述,不再赘述。第一电子设备一直在第一信道循环监听,可以增加被发现的概率,缩短投屏时间。
可选的,在图14对应的实施例的基础上,第一电子设备执行信道监听时,若第一电子设备连接第二信道的AP,第一电子设备在第二信道执行监听,其中,第二信道属于社交信道。
本申请实施例中,在设备发现过程中,对于第一电子设备连接第二信道的AP的情况,可以参照实施例中情况2的相关描述,不再赘述。
这样,第一电子设备既可以在1信道上与AP进行数据交互,又可以处于被发现状态,从而减少了频繁的信道切换,增加第一电子设备被发现的概率,缩短投屏时间,还提升了第一电子设备的上网体验。
可选的,在图14对应的实施例的基础上,第一电子设备执行信道监听时,若第一电子设备连接第三信道的AP,第一电子设备在第三信道执行监听,其中,第三信道属于2.4GHz频段的非社交信道。
本申请实施例中,如果第一电子设备连接2.4G非社交信道的AP,说明社交信道和第一电子设备的工作信道不在同一个信道。第一电子设备在第三信道进行循环监听,第一电子设备可以较大概率被扫描到。这样,第一电子设备既可以在第三信道上与AP进行数据交互,也可以处于被发现状态,既减少了频繁的信道切换,又提升了第一电子设备的上网体验。
可选的,在图14对应的实施例的基础上,第一电子设备执行信道监听时,若第一电子设备连接第四信道的AP,第一电子设备在第四信道和第五信道执行循环监听,其中,第四信道属于非社交信道,第五信道属于社交信道。
本申请实施例中,在设备发现过程中,对于第一电子设备连接第四信道的AP的情况,可以参照实施例中情况3的相关描述,不再赘述。
这样,第一电子设备既可以在一段时间内处于监听状态,使得第一电子设备可以被发现,还可以在大部分时间内处于与AP的通信状态,使得第一电子设备连接的网络不会断开,减少第一电子设备的界面卡顿。
可选的,在图14对应的实施例的基础上,在第一时间段之前,还可以包括:第二电子设备接收到用于投屏的操作。
本申请实施例中,用于投屏的操作可以包括用户点击投屏按钮的操作、用户语音输入的投屏触发操作等,本申请实施例不作限定。投屏按钮例如可以为上述图3对应的实施例中的无线投屏开关301。第二电子设备在接收到用于投屏的操作之后执行信道扫描,这样,第二电子设备可以在用户想要投屏时开始执行信道扫描,从而减少执行不必要的设备发现过程。
需要说明的是,图13对应的实施例中的第一时间段和图14对应的实施例中的第一时间段可以为不同的时间段,图13对应的实施例中的第二时间段和图14对应的实施例中的第二时间段可以为不同的时间段,图13对应的实施例中的第三时间段和图14对应的实施 例中的第三时间段可以为不同的时间段,图13对应的实施例中的第四时间段和图14对应的实施例中的第四时间段可以为不同的时间段,图13对应的实施例中的第五时间段和图14对应的实施例中的第五时间段可以为不同的时间段。也就是说,第一时间段、第二时间段、第三时间段、第四时间段、第五时间段的概念只在各自的实施例中进行理解。
此外,图13对应的实施例中的第一信道和图14对应的实施例中的第一信道可以为不同的信道,图13对应的实施例中的第二信道和图14对应的实施例中的第二信道可以为不同的信道,图13对应的实施例中的第三信道和图14对应的实施例中的第三信道可以为不同的信道,图13对应的实施例中的第四信道和图14对应的实施例中的第四信道可以为不同的信道,图13对应的实施例中的第五信道和图14对应的实施例中的第五信道可以为不同的信道。也就是说,第一信道、第二信道、第三信道、第四信道、第五信道的概念只在各自的实施例中进行理解。
图15示出了本申请实施例的设备发现方法。方法包括:
S1501、第一电子设备持续执行信道监听。
本申请实施例中,第一电子设备可以参照上述图13对应的实施例的步骤S1301中的相关描述,不再赘述。
信道监听可以参照上述图13对应的实施例的步骤S1301中的相关描述,不再赘述。
S1502、第二电子设备进行设备发现时,第二电子设备在执行信道扫描后,循环执行信道监听和信道搜索,或者,第二电子设备在执行信道扫描后,持续执行信道搜索。
本申请实施例中,第二电子设备可以参照上述图13对应的实施例的步骤S1301中的相关描述,不再赘述。信道扫描和信道搜索可以参照上述图13对应的实施例的步骤S1301中的相关描述,不再赘述。
在设备发现过程中,第一电子设备可以不需要切换到扫描状态或搜索状态,第一电子设备处于监听状态就可以被第二电子设备发现。可选的,第二电子设备也可以不需要切换到监听状态,只需要保留扫描状态和搜索状态就可以发现第一电子设备。这样,可以降低投屏时间,提升用户体验。
可选的,在图15对应的实施例的基础上,第一电子设备持续执行信道监听时,若第一电子设备未连接无线访问接入点AP,第一电子设备在第一信道持续执行信道监听,其中,第一信道属于社交信道。
本申请实施例中,在设备发现过程中,对于第一电子设备未连接无线访问接入点AP的情况,可以参照上述实施例中情况1的相关描述,以及上述图8对应实施例中的相关描述,不再赘述。第一电子设备一直在第一信道循环监听,可以增加被发现的概率,缩短投屏时间。
可选的,在图15对应的实施例的基础上,第一电子设备持续执行信道监听时,若第一电子设备连接第二信道的AP,第一电子设备在第二信道持续执行信道监听,其中,第二信道属于社交信道。
本申请实施例中,在设备发现过程中,对于第一电子设备连接第二信道的AP的情况,可以参照实施例中情况2的相关描述,不再赘述。
这样,第一电子设备既可以在1信道上与AP进行数据交互,又可以处于被发现状态,从而减少了频繁的信道切换,增加第一电子设备被发现的概率,缩短投屏时间,还提升了 第一电子设备的上网体验。
可选的,在图15对应的实施例的基础上,第一电子设备持续执行信道监听时,若第一电子设备连接第三信道的AP,第一电子设备在第三信道持续执行信道监听,其中,第三信道属于2.4GHz频段的非社交信道。
本申请实施例中,如果第一电子设备连接2.4G非社交信道的AP,说明社交信道和第一电子设备的工作信道不在同一个信道。第一电子设备在第三信道进行循环监听,第一电子设备可以较大概率被扫描到。这样,第一电子设备既可以在第三信道上与AP进行数据交互,也可以处于被发现状态,既减少了频繁的信道切换,又提升了第一电子设备的上网体验。
可选的,在图15对应的实施例的基础上,第一电子设备持续执行信道监听时,若第一电子设备连接第四信道的AP,第一电子设备在第四信道和第五信道循环执行信道监听,其中,第四信道属于非社交信道,第五信道属于社交信道。
本申请实施例中,在设备发现过程中,对于第一电子设备连接第四信道的AP的情况,可以参照实施例中情况3的相关描述,不再赘述。
这样,第一电子设备既可以在一段时间内处于监听状态,使得第一电子设备可以被发现,还可以在大部分时间内处于与AP的通信状态,使得第一电子设备连接的网络不会断开,减少第一电子设备的界面卡顿。
需要说明的是,图14对应的实施例中的第一信道和图15对应的实施例中的第一信道可以为不同的信道,图14对应的实施例中的第二信道和图15对应的实施例中的第二信道可以为不同的信道,图14对应的实施例中的第三信道和图15对应的实施例中的第三信道可以为不同的信道,图14对应的实施例中的第四信道和图15对应的实施例中的第四信道可以为不同的信道,图14对应的实施例中的第五信道和图15对应的实施例中的第五信道可以为不同的信道。也就是说,第一信道、第二信道、第三信道、第四信道、第五信道的概念只在各自的实施例中进行理解。
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。
上述主要从方法的角度对本申请实施例提供的方案进行了介绍。为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的方法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对实现该方法的装置进行功能模块的划分,例如可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际 实现时可以有另外的划分方式。
如图16示为本申请实施例提供的一种芯片的结构示意图。芯片1600包括一个或两个以上(包括两个)处理器1601、通信线路1602、通信接口1603和存储器1604。
在一些实施方式中,存储器1604存储了如下的元素:可执行模块或者数据结构,或者他们的子集,或者他们的扩展集。
上述本申请实施例描述的方法可以应用于处理器1601中,或者由处理器1601实现。处理器1601可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1601中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1601可以是通用处理器(例如,微处理器或常规处理器)、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门、晶体管逻辑器件或分立硬件组件,处理器1601可以实现或者执行本申请实施例中的公开的各处理相关的方法、步骤及逻辑框图。
结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。其中,软件模块可以位于随机存储器、只读存储器、可编程只读存储器或带电可擦写可编程存储器(electrically erasable programmable read only memory,EEPROM)等本领域成熟的存储介质中。该存储介质位于存储器1604,处理器1601读取存储器1604中的信息,结合其硬件完成上述方法的步骤。
处理器1601、存储器1604以及通信接口1603之间可以通过通信线路1602进行通信。
在上述实施例中,存储器存储的供处理器执行的指令可以以计算机程序产品的形式实现。其中,计算机程序产品可以是事先写入在存储器中,也可以是以软件形式下载并安装在存储器中。
本申请实施例还提供一种计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。例如,可用介质可以包括磁性介质(例如,软盘、硬盘或磁带)、光介质(例如,数字通用光盘(digital versatiledisc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本申请实施例还提供一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。
作为一种可能的设计,计算机可读介质可以包括紧凑型光盘只读储存器(compact disc read-only memory,CD-ROM)、RAM、ROM、EEPROM或其它光盘存储器;计算机可读 介质可以包括磁盘存储器或其它磁盘存储设备。而且,任何连接线也可以被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,DSL或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘(CD),激光盘,光盘,数字通用光盘(digital versatiledisc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理单元以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理单元执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。

Claims (27)

  1. 一种设备发现方法,其特征在于,应用于设备发现系统,所述设备发现系统包括进行设备发现的第一电子设备和第二电子设备,所述方法包括:
    第一时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道扫描;
    第二时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道监听;
    第三时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道搜索;
    第四时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道监听;
    第五时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道搜索;
    其中,所述第一时间段与所述第二时间段连续,所述第二时间段与所述第三时间段连续,所述第三时间段与所述第四时间段连续,所述第四时间段与所述第五时间段连续。
  2. 根据权利要求1所述的方法,其特征在于,所述第一电子设备执行信道监听时,若所述第一电子设备未连接无线访问接入点AP,所述第一电子设备在第一信道执行监听,其中,所述第一信道属于社交信道。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一电子设备执行信道监听时,若所述第一电子设备连接第二信道的AP,所述第一电子设备在所述第二信道执行监听,其中,所述第二信道属于所述社交信道。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一电子设备执行信道监听时,若所述第一电子设备连接第三信道的AP,所述第一电子设备在所述第三信道执行监听,其中,所述第三信道属于2.4GHz频段的非社交信道。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一电子设备执行信道监听时,若所述第一电子设备连接第四信道的AP,所述第一电子设备在所述第四信道和第五信道执行循环监听,其中,所述第四信道属于非社交信道,所述第五信道属于所述社交信道。
  6. 根据权利要求5所述的方法,其特征在于,所述第一电子设备支持双频双发DBDC工作模式,所述第一电子设备在所述第四信道和第五信道执行循环监听时,
    若所述第一电子设备从所述第四信道切换到所述第五信道执行监听,所述第一电子设备从双天线工作切换到单天线工作;
    若所述第一电子设备从所述第五信道切换到所述第四信道执行监听,所述第一电子设备从单天线工作切换到双天线工作。
  7. 根据权利要求6所述的方法,其特征在于,所述第一电子设备从双天线工作切换到单天线工作时,所述第一电子设备通过Wi-Fi管理帧通知AP所述第一电子设备从双天线工作切换到单天线工作;
    所述第一电子设备从单天线工作切换到双天线工作时,所述第一电子设备通过所述Wi-Fi管理帧通知AP所述第一电子设备从单天线工作切换到双天线工作。
  8. 根据权利要求5所述的方法,其特征在于,所述第一电子设备支持双频双发DBDC工作模式,所述第一电子设备在所述第四信道和第五信道执行循环监听时,
    若所述第一电子设备在所述第四信道执行监听,所述第一电子设备使用两根天线在所述第四信道与AP通信,使用所述两根天线在所述第四信道执行监听;
    若所述第一电子设备在所述第五信道执行监听,所述第一电子设备使用一根天线在所 述第四信道与AP通信,使用另一根天线在所述第五信道执行监听。
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述第一电子设备支持双频同步DBS工作模式,所述第一电子设备执行信道监听时,若所述第一电子设备连接第六信道的AP,所述第一电子设备使用两根天线在所述第六信道与AP通信,使用所述两根天线在所述第六信道执行监听,其中,所述第六信道属于5GHz频段的信道。
  10. 根据权利要求1-9任一项所述的方法,其特征在于,在所述第一时间段之前,还包括:
    所述第二电子设备接收到用于投屏的操作。
  11. 一种设备发现方法,其特征在于,应用于设备发现系统,所述设备发现系统包括进行设备发现的第一电子设备和第二电子设备,所述方法包括:
    第一时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道扫描;
    第二时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道搜索;
    第三时间段,所述第一电子设备执行信道监听,所述第二电子设备在所述第二电子设备的工作信道执行任务;
    第四时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道搜索;
    第五时间段,所述第一电子设备执行信道监听,所述第二电子设备在所述第二电子设备的工作信道执行任务;
    第六时间段,所述第一电子设备执行信道监听,所述第二电子设备执行信道搜索;
    其中,所述第一时间段与所述第二时间段连续,所述第二时间段与所述第三时间段连续,所述第三时间段与所述第四时间段连续,所述第四时间段与所述第五时间段连续,所述第五时间段与所述第六时间段连续。
  12. 根据权利要求11所述的方法,其特征在于,在所述第二时间段,所述第二电子设备在所述第二电子设备的工作信道执行信道搜索,在所述第四时间段,所述第二电子设备在社交信道执行信道搜索,在所述第六时间段,所述第二电子设备在所述第二电子设备的工作信道执行信道搜索。
  13. 根据权利要求11所述的方法,其特征在于,所述第二电子设备在社交信道和所述第二电子设备的工作信道执行信道搜索。
  14. 根据权利要求11-13任一项所述的方法,其特征在于,所述第一电子设备执行信道监听时,若所述第一电子设备未连接无线访问接入点AP,所述第一电子设备在第一信道执行监听,其中,所述第一信道属于社交信道。
  15. 根据权利要求11-14任一项所述的方法,其特征在于,所述第一电子设备执行信道监听时,若所述第一电子设备连接第二信道的AP,所述第一电子设备在所述第二信道执行监听,其中,所述第二信道属于所述社交信道。
  16. 根据权利要求11-15任一项所述的方法,其特征在于,所述第一电子设备执行信道监听时,若所述第一电子设备连接第三信道的AP,所述第一电子设备在所述第三信道执行监听,其中,所述第三信道属于2.4GHz频段的非社交信道。
  17. 根据权利要求11-15任一项所述的方法,其特征在于,所述第一电子设备执行信道监听时,若所述第一电子设备连接第四信道的AP,所述第一电子设备在所述第四信道和第五信道执行循环监听,其中,所述第四信道属于非社交信道,所述第五信道属于所述 社交信道。
  18. 根据权利要求11-17任一项所述的方法,其特征在于,在所述第一时间段之前,还包括:
    所述第二电子设备接收到用于投屏的操作。
  19. 一种设备发现方法,其特征在于,应用于设备发现系统,所述设备发现系统包括进行设备发现的第一电子设备和第二电子设备,所述方法包括:
    所述第一电子设备持续执行信道监听;
    所述第二电子设备进行设备发现时,所述第二电子设备在执行信道扫描后,循环执行信道监听和信道搜索,或者,所述第二电子设备在执行信道扫描后,持续执行信道搜索。
  20. 根据权利要求19所述的方法,其特征在于,所述第一电子设备持续执行信道监听时,若所述第一电子设备未连接无线访问接入点AP,所述第一电子设备在第一信道持续执行信道监听,其中,所述第一信道属于社交信道。
  21. 根据权利要求19-20任一项所述的方法,其特征在于,所述第一电子设备持续执行信道监听时,若所述第一电子设备连接第二信道的AP,所述第一电子设备在所述第二信道持续执行信道监听,其中,所述第二信道属于所述社交信道。
  22. 根据权利要求19-21任一项所述的方法,其特征在于,所述第一电子设备持续执行信道监听时,若所述第一电子设备连接第三信道的AP,所述第一电子设备在所述第三信道持续执行信道监听,其中,所述第三信道属于2.4GHz频段的非社交信道。
  23. 根据权利要求19-21任一项所述的方法,其特征在于,所述第一电子设备持续执行信道监听时,若所述第一电子设备连接第四信道的AP,所述第一电子设备在所述第四信道和第五信道循环执行信道监听,其中,所述第四信道属于非社交信道,所述第五信道属于所述社交信道。
  24. 一种电子设备,其特征在于,包括:存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于执行所述计算机程序,以执行如权利要求1-23任一项所述的方法中第一电子设备所执行的方法,或者以执行如权利要求1-23任一项所述的方法中第二电子设备所执行的方法。
  25. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有指令,当所述指令被执行时,使得计算机执行如权利要求1-23任一项所述的方法中第一电子设备所执行的方法,或者以执行如权利要求1-23任一项所述的方法中第二电子设备所执行的方法。
  26. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被运行时,使得电子设备执行如权利要求1-23任一项所述的方法中第一电子设备所执行的方法,或者以执行如权利要求1-23任一项所述的方法中第二电子设备所执行的方法。
  27. 一种设备发现系统,其特征在于,包括:第一电子设备和第二电子设备,所述第一电子设备用于执行如权利要求1-23任一项所述的方法中第一电子设备所执行的方法,所述第二电子设备用于执行如权利要求1-23任一项所述的方法中第二电子设备所执行的方法。
PCT/CN2024/083080 2023-06-15 2024-03-21 设备发现方法及相关装置 Ceased WO2024255375A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310717557.6 2023-06-15
CN202310717557.6A CN119155668A (zh) 2023-06-15 2023-06-15 设备发现方法及相关装置

Publications (2)

Publication Number Publication Date
WO2024255375A1 true WO2024255375A1 (zh) 2024-12-19
WO2024255375A9 WO2024255375A9 (zh) 2025-02-06

Family

ID=93817834

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/083080 Ceased WO2024255375A1 (zh) 2023-06-15 2024-03-21 设备发现方法及相关装置

Country Status (2)

Country Link
CN (1) CN119155668A (zh)
WO (1) WO2024255375A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780672A (zh) * 2012-10-22 2014-05-07 三星电子株式会社 Wi-fi p2p通信终端装置及其通信方法
CN103997795A (zh) * 2013-02-18 2014-08-20 三星电子株式会社 电子装置及其无线保真对等连接方法
US20160157289A1 (en) * 2011-09-14 2016-06-02 Samsung Electronics Co., Ltd. Method for using legacy wi-fi and wi-fi p2p simultaneously
CN110518950A (zh) * 2018-05-22 2019-11-29 成都鼎桥通信技术有限公司 天线发射模式的控制方法及终端
CN112448964A (zh) * 2019-08-10 2021-03-05 华为技术有限公司 一种设备发现方法及p2p设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160157289A1 (en) * 2011-09-14 2016-06-02 Samsung Electronics Co., Ltd. Method for using legacy wi-fi and wi-fi p2p simultaneously
CN103780672A (zh) * 2012-10-22 2014-05-07 三星电子株式会社 Wi-fi p2p通信终端装置及其通信方法
CN103997795A (zh) * 2013-02-18 2014-08-20 三星电子株式会社 电子装置及其无线保真对等连接方法
CN110518950A (zh) * 2018-05-22 2019-11-29 成都鼎桥通信技术有限公司 天线发射模式的控制方法及终端
CN112448964A (zh) * 2019-08-10 2021-03-05 华为技术有限公司 一种设备发现方法及p2p设备

Also Published As

Publication number Publication date
WO2024255375A9 (zh) 2025-02-06
CN119155668A (zh) 2024-12-17

Similar Documents

Publication Publication Date Title
CN115988643B (zh) WiFi P2P连接方法、电子设备和介质
US12543230B2 (en) Method for implementing Wi-Fi peer-to-peer service and related device
JP7554905B2 (ja) チャネル調整方法および電子デバイス
WO2021051986A1 (zh) 设备之间建立连接的方法及电子设备
WO2020233538A1 (zh) 一种接入无线局域网的方法和终端
CN115348630A (zh) 多设备协同方法及相关装置
CN113645608B (zh) 数据传输方法和数据传输装置
WO2022116974A1 (zh) 接入方法、系统及电子设备
CN114390501A (zh) 数据传输的方法及电子设备
WO2023061146A9 (zh) 用于监听链路的方法和终端设备
CN115150753B (zh) 蓝牙通信方法及系统
CN113835802A (zh) 设备交互方法、系统、设备及计算机可读存储介质
WO2024255375A9 (zh) 设备发现方法及相关装置
CN118139210B (zh) 一种路由器的连接方法、装置及系统
WO2023124258A1 (zh) 远程访问用户识别模块sim卡的方法和装置
CN115811748A (zh) 通信方法、系统及电子设备
WO2025026310A1 (zh) 通信控制方法、系统及相关装置
CN116419362B (zh) 数据传输方法、终端设备及计算机可读存储介质
WO2024193086A1 (zh) 网络连接方法、电子设备及可读存储介质
WO2024239760A9 (zh) 通信网络连接方法、设备及存储介质
CN121751394A (zh) 一种数据传输方法、装置、电子设备及存储介质
CN119653349A (zh) 连接方法、电子设备、产品及计算机可读介质
WO2024046173A1 (zh) 天线复用方法及相关装置
CN121050811A (zh) 消息通知方法、用户界面及相关装置
CN119277425A (zh) 一种通信方法及电子设备

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: 24822331

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE