Device discovery method and related apparatus
By keeping a listening state during wireless Miracast casting on a smart TV and looping between social and work channels, the problem of long device discovery time is solved, improving user experience and network connection stability.
Patent Information
- Application Number
- PCT/CN2024/083080
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-15
- Filing Date
- 2024-03-21
- Publication Date
- 2025-02-06
AI Technical Summary
In the process of discovering devices based on the Wi-Fi P2P protocol, the discovery time of electronic devices is relatively long, resulting in a degraded user experience.
During wireless Miracast screen mirroring, smart TVs do not need to switch to scanning or searching mode. Instead, they remain in listening mode to increase the probability of being discovered. By cyclically listening between social and work channels, they reduce channel switching and improve discovery speed.
It shortens device discovery time, improves screen mirroring and internet browsing experience, reduces interface lag, and enhances network connection stability.
Smart Images

Figure CN2024083080_06022025_PF_FP_ABST
Abstract
Description
Device discovery method and related device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on June 15, 2023, with application number 202310717557.6 and application name “Device Discovery Method and Related Apparatus”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a device discovery method and related apparatus. Background Art
[0003] With the development of electronic technology, some electronic devices support wireless Miracast screen projection. In the application scenario of wireless Miracast screen projection, electronic device A that supports the wireless fidelity (Wi-Fi) peer-to-peer (P2P) protocol can be paired with electronic device B that supports the Wi-Fi P2P protocol. After the two electronic devices are successfully paired, the screen content of electronic device A can be projected onto the interface of electronic device B.
[0004] However, in the device discovery process based on the Wi-Fi P2P protocol, the discovery time of electronic devices is long, which reduces the user experience.
[0005] Summary of the Invention
[0006] The device discovery method and related apparatus provided in the embodiments of the present application enable wireless Miracast device discovery, as the smart TV does not need to discover the mobile phone. Therefore, during device discovery based on the Wi-Fi P2P protocol, the smart TV can be discovered by the mobile phone while in the listening state, without switching to a scanning or searching state. This allows the smart TV to remain in the listening state for a longer period of time, increasing the probability of being discovered and reducing the time it takes to discover the screen, thereby improving the screen casting experience.
[0007] In a first aspect, an embodiment of the present application provides a device discovery method, the method comprising:
[0008] In the first time period, the first electronic device performs channel monitoring and the second electronic device performs channel scanning; in the second time period, the first electronic device performs channel monitoring and the second electronic device performs channel monitoring; in the third time period, the first electronic device performs channel monitoring and the second electronic device performs channel search; in the fourth time period, the first electronic device performs channel monitoring and the second electronic device performs channel monitoring; in the fifth time period, the first electronic device performs channel monitoring and the second electronic device performs channel search; 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. In this way, the probability of the first electronic device being discovered can be increased, the time for screen casting to be discovered can be reduced, and the screen casting experience can be improved.
[0009] In one possible implementation, when the first electronic device is monitoring a channel, if it is not connected to a wireless access point (AP), it monitors the first channel, which is a social channel. This way, the first electronic device continuously monitors the first channel, increasing its chances of being discovered and shortening the screen projection time.
[0010] In one possible implementation, when a first electronic device is monitoring a channel, if it connects to an AP on a second channel, the first electronic device monitors the second channel, where the second channel is a social channel. This reduces frequent channel switching, increases the probability of the first electronic device being discovered, shortens screen projection time, and improves the first electronic device's online experience.
[0011] In one possible implementation, when a first electronic device is performing channel monitoring, if it is connected to an AP on a third channel, the first electronic device will monitor the third channel, which is a non-social channel in the 2.4 GHz frequency band. This reduces frequent channel switching and improves the Internet experience of the first electronic device.
[0012] In one possible implementation, when a first electronic device is performing channel monitoring, if it is connected to an AP on the fourth channel, the first electronic device performs a looped monitoring on the fourth and fifth channels, where the fourth channel is a non-social channel and the fifth channel is a social channel. This ensures that the network connected to the first electronic device is not disconnected, reducing interface lag on the first electronic device.
[0013] In one possible implementation, the first electronic device supports a dual-band dual-transmit (DBDC) operating mode. When the first electronic device performs cyclic monitoring on the fourth and fifth channels, if the first electronic device switches from the fourth channel to the fifth channel for monitoring, the first electronic device switches from dual-antenna operation to single-antenna operation; and if the first electronic device switches from the fifth channel to the fourth channel for monitoring, the first electronic device switches from single-antenna operation to dual-antenna operation. In this way, the switching between dual-antenna operation and single-antenna operation of the first electronic device can ensure that the network speed of the first electronic device does not drop to zero when the first electronic device is in the Wi-Fi P2P monitoring state.
[0014] In one possible implementation, when the first electronic device switches from dual-antenna operation to single-antenna operation, the first electronic device notifies the AP of the switch via a Wi-Fi management frame. When the first electronic device switches from single-antenna operation to dual-antenna operation, the first electronic device notifies the AP of the switch via a Wi-Fi management frame. In this way, switching antennas does not affect data transmission and reception between the first electronic device and the AP.
[0015] In one possible implementation, the first electronic device supports the dual-band dual-transmit DBDC working mode. 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. In this way, the user's Internet experience can be met and the quick discovery of screen projection can be achieved.
[0016] In one possible implementation, the first electronic device supports dual-band synchronous DBS working mode. When the first electronic device performs channel monitoring, if the first electronic device is connected to an AP on the sixth channel, the first electronic device uses two antennas to communicate with the AP on the sixth channel and uses two antennas to perform monitoring on the sixth channel, where the sixth channel belongs to the 5GHz frequency band. In this way, while the Internet access speed of the first electronic device is not reduced, the discovery of screen projection is also accelerated.
[0017] In one possible implementation, before the first time period, the second electronic device may receive an operation for screen projection. In this way, the second electronic device may start channel scanning when the user wants to project the screen, thereby reducing unnecessary device discovery processes.
[0018] In a second aspect, an embodiment of the present application provides a device discovery method, the method comprising:
[0019] In the first time period, the first electronic device performs channel monitoring and the second electronic device performs channel scanning; in the second time period, the first electronic device performs channel monitoring and the second electronic device performs channel searching; in the third time period, the first electronic device performs channel monitoring and the second electronic device performs tasks on the working channel of the second electronic device; in the fourth time period, the first electronic device performs channel monitoring and the second electronic device performs channel searching; in the fifth time period, the first electronic device performs channel monitoring and the second electronic device performs tasks on the working channel of the second electronic device; in the sixth 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. In this way, the probability of the first electronic device being discovered can be increased, the time for screen casting to be discovered can be reduced, and the screen casting experience can be improved.
[0020] In one possible implementation, during the second time period, the second electronic device performs a channel search on the second electronic device's working channel. During the fourth time period, the second electronic device performs a channel search on the social channel. During the sixth time period, the second electronic device performs a channel search on the second electronic device's working channel. This increases the probability of the second electronic device discovering the first electronic device when casting a screen, and reduces the time it takes to discover the screen.
[0021] In one possible implementation, the second electronic device performs a channel search on the social channel and the working channel of the second electronic device. This can increase the probability of the second electronic device discovering the first electronic device when casting the screen and reduce the casting discovery time.
[0022] In one possible implementation, when the first electronic device is monitoring a channel, if it is not connected to a wireless access point (AP), it monitors the first channel, which is a social channel. This way, the first electronic device continuously monitors the first channel, increasing its chances of being discovered and shortening the screen projection time.
[0023] In one possible implementation, when a first electronic device is monitoring a channel, if it connects to an AP on a second channel, the first electronic device monitors the second channel, where the second channel is a social channel. This reduces frequent channel switching, increases the probability of the first electronic device being discovered, shortens screen projection time, and improves the first electronic device's online experience.
[0024] In one possible implementation, when a first electronic device is performing channel monitoring, if it is connected to an AP on a third channel, the first electronic device will monitor the third channel, which is a non-social channel in the 2.4 GHz frequency band. This reduces frequent channel switching and improves the Internet experience of the first electronic device.
[0025] In one possible implementation, when a first electronic device is performing channel monitoring, if it is connected to an AP on the fourth channel, the first electronic device performs a looped monitoring on the fourth and fifth channels, where the fourth channel is a non-social channel and the fifth channel is a social channel. This ensures that the network connected to the first electronic device is not disconnected, reducing interface lag on the first electronic device.
[0026] In one possible implementation, before the first time period, the second electronic device may receive an operation for screen projection. In this way, the second electronic device may start channel scanning when the user wants to project the screen, thereby reducing unnecessary device discovery processes.
[0027] In a third aspect, an embodiment of the present application provides a device discovery method, the method comprising:
[0028] The first electronic device continuously performs channel monitoring; when the second electronic device performs device discovery, the second electronic device performs channel scanning and then loops through channel monitoring and channel searching, or the second electronic device performs channel scanning and then continuously performs channel searching. This increases the probability of the first electronic device being discovered, reduces the time it takes to discover the screen projection, and thus improves the screen projection experience.
[0029] In one possible implementation, when the first electronic device continuously monitors a channel, if the first electronic device is not connected to a wireless access point (AP), the first electronic device continuously monitors a first channel, where the first channel is a social channel. This allows the first electronic device to continuously monitor the first channel, increasing its probability of being discovered and shortening the screen projection time.
[0030] In one possible implementation, while a first electronic device is continuously monitoring a channel, if the first electronic device is connected to an AP on a second channel, the first electronic device will continue to monitor the second channel, where the second channel is a social channel. This reduces frequent channel switching, increases the probability of the first electronic device being discovered, shortens screen projection time, and improves the first electronic device's online experience.
[0031] In one possible implementation, while the first electronic device is continuously monitoring a channel, if the first electronic device is connected to an AP on a third channel, the first electronic device continuously monitors the third channel, which is a non-social channel in the 2.4 GHz frequency band. This reduces frequent channel switching and improves the Internet experience of the first electronic device.
[0032] In one possible implementation, while the first electronic device is continuously monitoring the network, if it connects to an AP on the fourth channel, the first electronic device will cycle through the fourth and fifth channels, where the fourth channel is a non-social channel and the fifth channel is a social channel. This ensures that the network connection of the first electronic device is not disconnected, reducing interface lag on the first electronic device.
[0033] In a fourth aspect, an embodiment of the present application provides a device discovery system, which includes a first electronic device and a second electronic device. The first electronic device is used to execute the method executed by the first electronic device in the first aspect or any possible implementation of the first aspect, or to execute the method executed by the first electronic device in the second aspect or any possible implementation of the second aspect, or to execute the method executed by the first electronic device in the third aspect or any possible implementation of the third aspect. The second electronic device is used to execute the method executed by the second electronic device in the first aspect or any possible implementation of the first aspect, or to execute the method executed by the second electronic device in the second aspect or any possible implementation of the second aspect, or to execute the method executed by the second electronic device in the third aspect or any possible implementation of the third aspect.
[0034] Exemplarily, the first electronic device is used to perform channel monitoring, specifically including performing monitoring on the first channel, performing monitoring on the second channel, performing monitoring on the third channel, performing cyclic monitoring on the fourth channel and the fifth channel, and performing monitoring on the sixth channel.
[0035] The first electronic device is further configured to switch from dual-antenna operation to single-antenna operation, and from single-antenna operation to dual-antenna operation, and to notify the AP through a Wi-Fi management frame.
[0036] The first electronic device is also used to communicate with the AP on the fourth channel using two antennas and to perform monitoring on the fourth channel using two antennas; it is also used to communicate with the AP on the fourth channel using one antenna and to perform monitoring on the fifth channel using another antenna; it is also used to communicate with the AP on the sixth channel using two antennas and to perform monitoring on the sixth channel using two antennas.
[0037] The second electronic device is used to perform channel scanning, perform channel searching, and execute tasks on the working channel of the second electronic device.
[0038] The second electronic device is further configured to perform a channel search on the working channel of the second electronic device, and is further configured to perform a channel search on the social channel and the working channel of the second electronic device.
[0039] The second electronic device is further used to receive an operation for screen projection.
[0040] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute the method executed by the first electronic device in the first aspect or any possible implementation of the first aspect, or execute the method executed by the second electronic device in the first aspect or any possible implementation of the first aspect; or execute the method executed by the first electronic device in the second aspect or any possible implementation of the second aspect, or execute the method executed by the second electronic device in the second aspect or any possible implementation of the second aspect; or execute the method executed by the first electronic device in the third aspect or any possible implementation of the third aspect, or execute the method executed by the second electronic device in the third aspect or any possible implementation of the third aspect.
[0041] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is run on a computer, the computer executes the method executed by the first electronic device in the first aspect or any possible implementation of the first aspect, or executes the method executed by the second electronic device in the first aspect or any possible implementation of the first aspect; or executes the method executed by the first electronic device in the second aspect or any possible implementation of the second aspect, or executes the method executed by the second electronic device in the second aspect or any possible implementation of the second aspect; or executes the method executed by the first electronic device in the third aspect or any possible implementation of the third aspect, or executes the method executed by the second electronic device in the third aspect or any possible implementation of the third aspect.
[0042] In the seventh aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program runs on a computer, it enables the computer to execute the method executed by the first electronic device in the first aspect or any possible implementation of the first aspect, or execute the method executed by the second electronic device in the first aspect or any possible implementation of the first aspect; or execute the method executed by the first electronic device in the second aspect or any possible implementation of the second aspect, or execute the method executed by the second electronic device in the second aspect or any possible implementation of the second aspect; or execute the method executed by the first electronic device in the third aspect or any possible implementation of the third aspect, or execute the method executed by the second electronic device in the third aspect or any possible implementation of the third aspect.
[0043] In an eighth aspect, the present application provides a chip or a chip system, which includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is used to run a computer program or instruction to execute the method executed by the first electronic device in the first aspect or any possible implementation of the first aspect, or execute the method executed by the second electronic device in the first aspect or any possible implementation of the first aspect; or execute the method executed by the first electronic device in the second aspect or any possible implementation of the second aspect, or execute the method executed by the second electronic device in the second aspect or any possible implementation of the second aspect; or execute the method executed by the first electronic device in the third aspect or any possible implementation of the third aspect, or execute the method executed by the second electronic device in the third aspect or any possible implementation of the third aspect. Among them, the communication interface in the chip can be an input / output interface, a pin or a circuit, etc.
[0044] In one possible implementation, the chip or chip system described above in this application further includes at least one memory, in which instructions are stored. The memory may be a storage unit within the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).
[0045] It should be understood that the fourth to eighth aspects of the present application correspond to the technical solutions of the first, second or third aspects of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0047] FIG2 is a schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0048] FIG3 is a schematic diagram of a usage scenario of wireless Miracast screen projection provided by an embodiment of the present application;
[0049] FIG4 is a schematic diagram of a wireless screen projection window of a smart TV provided in an embodiment of the present application;
[0050] FIG5 is a schematic diagram of a device discovery process based on the Wi-Fi P2P protocol provided in an embodiment of the present application;
[0051] FIG6 is a schematic diagram of a channel monitoring time consumption provided by an embodiment of the present application;
[0052] FIG7 is a schematic diagram illustrating the impact of a device discovery process on site data transmission according to an embodiment of the present application;
[0053] FIG8 is a schematic diagram of a scenario of a device discovery method provided in an embodiment of the present application;
[0054] FIG9 is a schematic diagram of another device discovery method according to an embodiment of the present application;
[0055] FIG10 is a schematic diagram of an extended scenario of a device discovery method provided in an embodiment of the present application;
[0056] FIG11 is a schematic diagram of an improved screen projection source end of a device discovery method provided in an embodiment of the present application;
[0057] FIG12 is a schematic diagram of an improved screen projection source end of another device discovery method provided in an embodiment of the present application;
[0058] FIG13 is a schematic diagram of a device discovery method provided in an embodiment of the present application;
[0059] FIG14 is a schematic diagram of another device discovery method provided in an embodiment of the present application;
[0060] FIG15 is a schematic diagram of another device discovery method provided in an embodiment of the present application;
[0061] FIG16 is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] To facilitate a clear description of the technical solutions of the embodiments of the present application, some of the terms and technologies involved in the embodiments of the present application are briefly introduced below:
[0063] 1. Social channel: Social channels include channels 1, 6, and 11 in the 2.4 GHz frequency band. Social channels can also be called regular channels.
[0064] 2. Non-social channels in the 2.4 GHz band: including channels 2, 3, 4, 5, 7, 8, 9, 10, 12, and 13 in the 2.4 GHz band.
[0065] 3. 5 GHz frequency band channels: including 5 GHz frequency band channels 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, and 165.
[0066] 4. Non-social channels: These include non-social channels in the 2.4 GHz band and channels in the 5 GHz band. Non-social channels can also be called unconventional channels.
[0067] 5. Operating Channel: An operating channel is the channel used by an electronic device as a station (STA) to connect to a wireless access point (AP). This channel can also be called an operational channel.
[0068] 6. Terminology
[0069] In the embodiments of this application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the terms "first chip" and "second chip" are used solely to distinguish between different chips and do not define their order. Those skilled in the art will understand that terms such as "first" and "second" do not define the quantity or execution order, and do not necessarily define differences.
[0070] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0071] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.
[0072] 7. Electronic devices
[0073] The electronic device of the embodiment of the present application may also be a terminal device in any form. For example, the electronic device may include a handheld device, a vehicle-mounted device, etc. For example, some electronic devices include: mobile phones, tablet computers, PDAs, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving cars, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, electronic devices in 5G networks or future evolved public land mobile communication networks (PLMNs). The electronic devices in the network (PLMN) are not limited to this in the embodiments of the present application.
[0074] As an example and not a limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0075] In addition, in the embodiment of the present application, the electronic device can also be an electronic device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.
[0076] The electronic devices in the embodiments of the present application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
[0077] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also known as main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as the Linux operating system, the Unix operating system, the Android operating system, the iOS operating system, or the Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
[0078] For example, FIG1 shows a schematic structural diagram of an electronic device.
[0079] The electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0080] It is understood that the structures illustrated in the embodiments of the present invention do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0081] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0082] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0083] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0084] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface.
[0085] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present invention is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0086] The internal memory 121 can be used to store computer executable program code, and the executable program code includes instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor. For example, the method of an embodiment of the present application can be executed.
[0087] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0088] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna.
[0089] The wireless communication module 160 may include a Wi-Fi module. The Wi-Fi module may be used to transmit data. For example, the operating modes of the Wi-Fi module may include dual-band dual concurrent (DBDC) and dual-band simultaneous (DBS).
[0090] DBDC refers to an electronic device that supports two operating frequency bands and can use both bands for Wi-Fi connections simultaneously. For example, a device can establish Wi-Fi connections on both the 2.4GHz and 5GHz bands. A DBDC device can have two antennas: one for the 5GHz band and one for the 2.4GHz band.
[0091] DBS means that an electronic device can support two operating frequency bands and use both bands for Wi-Fi connections simultaneously. For example, a device can establish Wi-Fi connections on both the 2.4GHz and 5GHz bands. A DBS device can have two antennas, one for the 5GHz band and the other for the 2.4GHz band.
[0092] In some implementations, the electronic device may use a single input single output (SISO) method for data transmission. Exemplarily, when the electronic device transmits data based on a Wi-Fi connection, it uses one antenna for data transmission. For example, the Wi-Fi module in the electronic device establishes Wi-Fi connections in the 2.4GHz band and the 5GHz 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.4GHz band and another antenna for data transmission in the 5GHz band, that is, 1*1 2.4GHz+1*1 5GHz, where the first 1 in 1*1 represents one transmitting antenna and the second 1 represents one receiving antenna. It can be understood that the SISO method is equivalent to one Wi-Fi connection corresponding to one antenna, that is, corresponding to one data stream.
[0093] In other implementations, electronic devices may use a multiple input multiple output (MIMO) method for data transmission. Exemplarily, when an electronic device transmits data based on a Wi-Fi connection, it uses two antennas for data transmission. For example, the Wi-Fi module in the electronic device uses two antennas for data transmission in the 2.4GHz band, and the Wi-Fi module in the electronic device can also use the above two antennas for data transmission in the 5GHz band. That is to say, 2*2 2.4GHz+2*2 5GHz, where the first 2 in 2*2 represents two transmitting antennas, and the second 2 represents two receiving antennas. It can be understood that the MIMO method is equivalent to one Wi-Fi connection corresponding to two 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.
[0094] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. In some embodiments, the electronic device may include one or N display screens 194, where N is a positive integer greater than 1. The electronic device implements display functionality through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects display screen 194 and the application processor. For example, in an embodiment of the present application, the display screen of a smart TV can project the content of a mobile phone interface.
[0095] Figure 2 is a block diagram of the software structure of an electronic device according to an embodiment of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers: the application layer, the application framework layer, the Android runtime and system libraries, the hardware abstraction layer, and the kernel layer.
[0096] The application layer can include a series of application packages. As shown in Figure 2, an application package can include applications such as video, music, and browser. Applications can include system applications and third-party applications.
[0097] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0098] As shown in FIG2 , the application framework layer may include a window manager, a resource manager, a notification manager, a content provider, a view system, and the like.
[0099] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, take screenshots, etc.
[0100] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0101] The notification manager enables applications to display notification information in the status bar. It can be used to convey informational messages and can disappear automatically after a short stay without user interaction. The notification manager can also be a notification that appears on the screen in the form of a dialog window.
[0102] Content providers are used to implement data sharing between different applications, allowing one program to access data in another while ensuring the security of the accessed data.
[0103] The view system is responsible for drawing the application interface and handling events.
[0104] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0105] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0106] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files in the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. For example, in the embodiments of the present application, the virtual machine can be used to perform functions such as screen projection display of electronic devices and device discovery based on the Wi-Fi P2P protocol.
[0107] The system library is also called the Native layer, which can include multiple functional modules, such as media libraries, function libraries, and graphics processing libraries (such as OpenGL ES).
[0108] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0109] The function library provides developers with API interfaces for multiple services, making it easy for developers to quickly integrate and implement various functions.
[0110] The graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0111] The Hardware Abstraction Layer (HAL) is an abstracted layer between the kernel and the Android runtime. It encapsulates hardware drivers and provides a unified interface for upper-layer applications. For example, in this embodiment, the HAL may include a Wpa_supplicant module, which can be used to perform logical control of Wi-Fi P2P protocol monitoring, scanning, and other functions.
[0112] The kernel layer is the layer between hardware and software. The kernel layer may include Wi-Fi drivers, display drivers, audio drivers, Bluetooth drivers, etc. For example, in the embodiment of the present application, the Wi-Fi driver can be used to scan, monitor, or search for channels.
[0113] It should be noted that the embodiments of the present application are only illustrated using the Android system as an example. In other operating systems (such as Windows system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of the present application, the solutions of the present application can also be implemented.
[0114] With the development of electronic technology, some electronic devices support wireless Miracast screen projection. In the application scenario of wireless Miracast screen projection, electronic device A that supports the Wi-Fi P2P protocol can be paired with electronic device B that supports the Wi-Fi P2P protocol. After the two electronic devices are successfully paired, data can be transmitted between the two electronic devices, so that the screen content of electronic device A can be projected to the interface of electronic device B. Among them, the Wi-Fi peer-to-peer network protocol can also be called the Wi-Fi point-to-point protocol or the Wi-Fi end-to-end protocol. Electronic device A can also be called the screen projection source end, and electronic device B can also be called the screen projection display end.
[0115] Below, we take electronic device A as a mobile phone and electronic device B as a smart TV as an example to illustrate the usage scenario of wireless Miracast screen projection.
[0116] FIG3 a is a drop-down menu interface 300 of a mobile phone. 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.
[0117] When the user clicks the wireless screen casting switch 301, the mobile phone may display interface 302 as shown in Figure 3b, and the mobile phone may discover nearby devices that can cast the screen. Interface 302 may display a wireless screen casting dialog box 303, which may include a prompt message, a cancel button, and a view help button. The prompt message may include "Searching for available devices...", the cancel button may be used to cancel wireless screen casting, and the view help button may be used to view help information related to wireless screen casting.
[0118] When the mobile phone finds an available screen projection device nearby, it may display interface 304 as shown in Figure 3c, and interface 304 may display an available device dialog box 305. The available device dialog box 305 may include an available device list, a cancel button, and a view help button. The available device list may include available device icons and available device names, the cancel button may be used to cancel wireless screen projection, and the view help button may be used to view help information related to wireless screen projection.
[0119] For example, when the user selects available device 1, as shown in FIG4 , available device 1 may be a smart TV, and a wireless screen casting window 401 may be displayed in the smart TV interface 400. It is understood that when the smart TV displays the wireless screen casting window 401, the user cannot continue to watch the video, etc., so the user may not perceive any lag in the smart TV interface, thereby improving the user experience.
[0120] The wireless screen projection window 401 may include a prompt message, an accept button, and a cancel button. The prompt message may include "XX device wants to project the screen, do you accept?" The accept button can be used to accept the mobile phone's screen projection request, and the cancel button can be used to cancel the mobile phone's screen projection request. When the user triggers the accept button, the mobile phone's screen content can be projected onto the smart TV interface. When the user triggers the cancel button, the mobile phone's screen content cannot be projected onto the smart TV interface.
[0121] In a possible implementation, 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.
[0122] It is understandable that the process of the mobile phone discovering the smart TV is implemented based on the Wi-Fi P2P protocol. Among them, the device discovery process based on the Wi-Fi P2P protocol can realize mutual discovery between two devices. Therefore, both the mobile phone and the smart TV can perform the device discovery process based on the Wi-Fi P2P protocol.
[0123] Taking a smart TV as the P2P device 1 as an example, FIG5 shows a device discovery process based on the Wi-Fi P2P protocol.
[0124] When the smart TV starts discovering devices, it can perform a full channel scan. At this time, the smart TV is in the scanning state, which is the scanning phase in the Wi-Fi P2P protocol. The full channel scan can scan for devices by sending probe requests on channels in the 2.4GHz band and the 5GHz band.
[0125] After the smart TV completes the full channel scan, it can enter the listening state. The time that the smart TV is in the listening 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 subsequent monitored channel will not change. When the smart TV starts discovering again next time, the smart TV can reselect any channel in the social channel as the channel to be monitored. When the smart TV is in the listening state, the smart TV can be discovered by P2P device 2. For the sake of convenience of description, the mobile phone will be described as P2P device 2 in the following.
[0126] After the listening state, the smart TV can enter the search state. The smart TV can search on each channel of the social channel. When the smart TV is in the search state, the smart TV can find the mobile phone in the listening state.
[0127] It is understood that the smart TV may subsequently cycle between the listening state and the searching state. For example, after the searching state, the smart TV may enter the listening state again, and after the listening state, the smart TV may enter the searching state again. Both the listening state and the searching state are in the discovery phase of the Wi-Fi P2P protocol.
[0128] As shown in Figure 5, when a smart TV is in listening mode for the first time, it monitors channel 1 in the 2.4GHz band, and the listening time is 200 TUs. The second time the smart TV is in listening mode, it monitors channel 1 again, and the listening time can be 100 TUs. When a mobile phone is in scanning mode and scans channel 1, it can discover the smart TV. Alternatively, when a mobile phone is in searching mode and scans channel 1, it can discover the smart TV. In other words, for a mobile phone to discover a smart TV, it must be in scanning or searching mode, and the smart TV must be in listening mode. The channel being scanned or searched by the mobile phone must be the same channel being monitored by the smart TV. However, this discovery process takes a long time for the smart TV to be discovered, reducing the user experience.
[0129] In a possible scenario, as shown in Figure 6, after the smart TV begins discovery, it can perform a full channel scan. For example, scanning 26 channels can take approximately 3.4 seconds. After completing the full channel scan, the smart TV can switch to a listening state. For example, the smart TV can listen on channel 6 for 307 milliseconds. After the listening state, the smart TV can switch to a working channel. For example, the working channel can be channel 149 in the 5GHz band. The smart TV can communicate data with the AP on the working channel, ensuring that the network between the smart TV and the AP is not disconnected. After a 50ms delay on the working channel, the smart TV can switch to a searching state. For example, the smart TV can search social channels for 626ms.
[0130] Afterwards, the smart TV can switch back to the listening state and repeat the above process. Among them, different electronic devices may have different delay times on the working channel. For example, some electronic devices may have a delay time of about 100ms on the working channel. The embodiments of this application do not limit the specific delay time of electronic devices on the working channel.
[0131] It's understandable that each loop of the process shown in Figure 6 can take over 900 milliseconds. Of these, only 307 milliseconds are the Smart TV discoverable by the phone, making it difficult to discover and increasing the discovery time. Furthermore, only 50 milliseconds of these 900 milliseconds are the Smart TV able to communicate with the AP, degrading the Smart TV's network and reducing the user experience.
[0132] In the process of the smart TV switching to the working channel shown in Figure 6 above, if the smart TV connects to an AP on a non-social channel as a STA, the smart TV discovery process based on the Wi-Fi P2P protocol can significantly impact the site's data transmission. Figure 7 below uses the example of a smart TV connected to a router on channel 149 in the 5 GHz band to illustrate this.
[0133] As shown in Figure 7, the data transmission rate between the smart TV and the router is around 350 Mbps, which is relatively high. However, around 21 seconds in, the smart TV needs to switch from channel 149 in the 5 GHz band to the social channel in the 2.4 GHz band to be discovered by the mobile phone. At this point, the data transmission rate between the smart TV and the router may drop to around 70 Mbps, which is relatively low, and the smart TV interface may experience lag. Therefore, the process of smart TV discovery based on the Wi-Fi P2P protocol can significantly impact site data transmission.
[0134] In view of this, the device discovery method provided in the embodiments of the present application allows the smart TV to be discovered by the mobile phone during the device discovery process of wireless Miracast screen casting. Therefore, during the device discovery process based on the Wi-Fi P2P protocol, the smart TV does not need to switch to a scanning or searching state; the smart TV can be discovered by the mobile phone while in a listening state. This allows the smart TV to remain in the listening state for a longer period of time, increasing the probability of being discovered and reducing the time it takes to discover the screen, thereby improving the screen casting experience.
[0135] In possible implementations, the device discovery method of the embodiment of the present application may include the following three cases:
[0136] 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.
[0137] As shown in Figure 8, taking the example of a smart TV selecting channel 1 of the 2.4GHz frequency band as the monitoring channel, the smart TV can keep monitoring on channel 1 in a loop after starting to discover. This increases the probability of the smart TV being discovered and shortens the screen projection time.
[0138] It is understandable that when the smart TV STA is not connected to an AP, 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 discoverable state and can be discovered by other devices at any time without the user having to perform complex operations, thereby improving the user experience. Alternatively, the smart TV can start the device discovery process based on the Wi-Fi P2P protocol when entering the wireless screen casting window. In this way, the smart TV is in a discoverable state when the user wants to cast the screen, reducing the execution of unnecessary device discovery processes.
[0139] 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.
[0140] That is, during 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 perform channel switching. The smart TV can use the connected social channel as the channel monitored by the smart TV in the monitoring state.
[0141] For example, if a smart TV STA is connected to channel 1 of the AP's 2.4 GHz band, scenario 2 can be as shown in Figure 8. After the smart TV begins discovery, it can continuously monitor channel 1. This allows the smart TV to interact with the AP on channel 1 while remaining discoverable. This reduces frequent channel switching, increases the likelihood of the smart TV being discovered, shortens screen projection time, and improves the smart TV's Internet experience.
[0142] Case 3: If the smart TV STA is connected to an AP on a non-social channel, the smart TV performs Wi-Fi P2P monitoring on both the social channel and the STA's working channel. Alternatively, if the smart TV STA is connected to an AP on a 2.4 GHz non-social channel, the smart TV can also perform Wi-Fi P2P monitoring on the STA's working channel.
[0143] That is, during device discovery based on the Wi-Fi P2P protocol, if a smart TV STA is connected to an AP on a non-social channel, the social channel and the smart TV STA's operating channel are different. For example, if the smart TV STA's operating channel is channel 149 on the 5 GHz band and the social channel is channel 1 on the 2.4 GHz band, the smart TV can loop through the social channel and the smart TV STA's operating channel.
[0144] If a smart TV STA connects to an AP on a non-2.4GHz social channel, the social channel and the smart TV STA's operating channel are different. For example, if the smart TV STA's operating channel is 2.4GHz channel 3 and its social channel is 2.4GHz channel 1, the smart TV can monitor channel 3 in a loop. When a mobile phone performs a full-channel scan, the smart TV is consistently on channel 3, so the phone is more likely to detect it. This allows the smart TV to interact with the AP on channel 3 while remaining discoverable. This reduces frequent channel switching and improves the smart TV's internet experience.
[0145] As shown in Figure 9, after the smart TV begins discovery, it can monitor channel 1 on the 2.4GHz band for 10ms, the working channel for 90ms, then continue monitoring channel 1 for 10ms, then the working channel for 90ms, repeating this cycle. This allows the smart TV to be in a listening state for a period of time, allowing it to be discovered, while also maintaining communication with the AP for most of the time, ensuring that the smart TV's connection to the network is not disconnected and reducing interface lag.
[0146] Optionally, as shown in FIG10 , in one cycle, the smart TV may first monitor on the working channel and then monitor on channel 1 of the 2.4 GHz frequency band, but this is not limited in this embodiment of the present application. For example, after starting discovery, 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 on channel 1 for 10 ms, in this order.
[0147] It's understandable that it's necessary for a smart TV to monitor social channels for a period of time. If a smart TV STA is connected to a 5GHz AP and monitors only on the working channel, a phone that only supports the 2.4GHz band will be unable to discover the smart TV. Furthermore, if a phone doesn't find the smart TV during the scanning phase, it will scan the social channels. If the smart TV monitors only on the working channel, the phone will not be able to discover the smart TV. Therefore, monitoring the social channels for a period of time can increase the chances of the smart TV being discovered.
[0148] It is understood that the monitoring time of the smart TV on the social channel and the monitoring time on the work channel can be pre-set by the smart TV. Among them, the monitoring time on the social channel and the monitoring time on the work channel can be equal or different, which is not limited in the embodiment of the present application.
[0149] Experimental testing shows that in scenario 3 above, when a smart TV STA connects to a 5GHz AP, the smart TV monitors the STA working channel for 90ms and the social channel for 10ms. Therefore, it is possible that the mobile phone may take about 10 seconds to discover the smart TV. For non-initial screen projection, the mobile phone connection time is about 3 seconds.
[0150] Tables 1, 2, and 3 below show the duration of mobile phone discovery and connection to smart TVs, respectively, under different ratios of social channel monitoring time to STA working channel monitoring time. A dual-band mobile phone can be understood as one that supports both 5G and 2.4G, and a 2.4G-only mobile phone can be understood as one that supports only 2.4G.
[0151] Table 1:
[0152] Table 2:
[0153] Table 3:
[0154] Furthermore, experimental testing has shown that when a smart TV STA is connected to an AP in the 5 GHz band, the device screen casting discovery process affects the interaction rate between the smart TV STA and the AP. As shown in Table 4, when the smart TV STA is always connected to the AP, the interaction rate is approximately 296 Mbps. However, when the ratio of the smart TV's monitoring time on social channels to the STA's monitoring time on the working channel is 50:450, the interaction rate drops to approximately 237 Mbps.
[0155] Table 4:
[0156] From the above experimental data, it can be seen that 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 discover or cannot discover 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.
[0157] In addition, when determining the monitoring time on the social channel and the monitoring time on the work channel, the influence of other factors such as channel switching duration, single channel scanning time, and service latency requirements may also be considered.
[0158] For example, if the channel switching time is around 140ms, it's not appropriate for a Smart TV to monitor Channel 1 for 10ms and the working channel for 90ms. This is because in one monitoring cycle, 10ms is used for discovery, 140ms for channel switching, and 90ms for connecting to the network. In other words, 140ms of the 240ms is not used for discovery or data transmission. Therefore, if the channel switching time is long, the Smart TV's monitoring time on Channel 1 and the working channel should be set to be relatively long.
[0159] Furthermore, if the scanning time for a single channel is approximately 40ms, since the mobile phone is expected to detect the smart TV during the channel scanning, the smart TV can monitor the channel for longer than 40ms. This increases the probability of the smart TV being detected by the mobile phone.
[0160] In summary, a compromise needs to be made between the ratio of social channel monitoring time and STA working channel monitoring time. This can reduce the time it takes to discover and connect to smart TVs while minimizing the decrease in Internet speed. This improves both the screen projection experience and the user's Internet experience.
[0161] In order to address the above-mentioned shortcomings such as the impact on Internet access speed when the smart TV is connected to an AP in the 5GHz frequency band, the embodiments of the present application can select different monitoring methods according to the chip specifications of the smart TV.
[0162] Monitoring method 1: If the smart TV supports DBDC, 2.4G and 5G can work concurrently using one antenna each.
[0163] In other words, if a smart TV supports DBDC, it can keep one antenna working on the site while performing Wi-Fi P2P loop monitoring and switch the other antenna to the social channel for loop monitoring. This ensures that the network speed of the smart TV STA does not drop to zero during Wi-Fi P2P monitoring.
[0164] In one possible scenario, when a smart TV performs cyclic monitoring based on the Wi-Fi P2P protocol, within each cycle, the smart TV may first monitor the STA working channel for a period of time, and then monitor the social channel for a period of time. When the smart TV needs to switch to the social channel for monitoring after monitoring the STA working channel, the smart TV STA can notify the AP through a Wi-Fi management frame or other means that the current smart TV needs to switch from dual-antenna operation to single-antenna operation, and then the smart TV can use one antenna to perform Wi-Fi P2P cyclic monitoring on the social channel. The embodiment of the present application does not limit the specific implementation method of the Wi-Fi management frame.
[0165] After the smart TV completes the Wi-Fi P2P loop monitoring, the smart TV STA can also notify the AP through Wi-Fi management frames, etc., that the smart TV is switching from a single antenna to dual antenna operation. It can be understood that the smart TV notifying the AP through Wi-Fi management frames, etc., ensures that the smart TV does not affect data transmission and reception between the smart TV and the AP after the antenna switch.
[0166] In another possible scenario, due to limitations such as user bandwidth and chip communication interfaces, even though a smart TV supports 2x2 MIMO, a single SISO antenna can actually achieve the maximum internet speed. For example, the theoretical rate of 2x2 MIMO is 866 Mbps, while the theoretical rate of 1x1 SISO is 433 Mbps. However, even though a smart TV supports 2x2 MIMO, the actual tested maximum rate is 296 Mbps. This means that a single SISO antenna is sufficient for the smart TV. In this case, the remaining antenna can be used for Wi-Fi P2P loop monitoring. This ensures a satisfactory internet experience for users while also enabling quick discovery of screen projection.
[0167] Monitoring method 2: If the smart TV supports DBS, 2.4G and 5G can each use two antennas.
[0168] In other words, the smart TV STA can use two antennas to communicate with the AP in MIMO mode and can also use these two antennas for Wi-Fi P2P loop monitoring. This allows the smart TV to communicate with the AP and continuously loop monitor the social channel, which not only maintains the smart TV STA's Internet speed but also speeds up the discovery of screen casting.
[0169] It should be noted that the device discovery methods in the above embodiments are all improvements made for the smart TV at the screen projection display end. In addition, in the wireless Miracast screen projection scenario, the mobile phone at the screen projection source end can also be improved.
[0170] Improvement 1: In wireless Miracast scenarios, since the phone only needs to discover the smart TV, not be discovered by the smart TV, the phone can be found in the scanning and searching states without switching to the listening state. This reduces the screen casting time and improves the user experience.
[0171] Improvement 2: In some wireless Miracast scenarios, the phone is close to the smart TV, and the two are likely to connect to the same AP. This means the phone's STA and the smart TV's STA are likely to be on the same channel. Therefore, the listening state in the Wi-Fi P2P protocol can be replaced with a scanning state that scans the phone's STA's operating channel. This increases the probability of the phone discovering the smart TV during screen casting and reduces the discovery time.
[0172] As shown in Figure 11, for example, a mobile phone connected to an AP on channel 149 in the 5 GHz band can scan all channels after starting discovery. For example, scanning 26 channels takes approximately 3.4 seconds. After completing the full channel scan, the phone can scan the working channel of the mobile STA. For example, the phone can scan channel 149 for 307 ms. The phone can also delay the working channel for approximately 50 ms, ensuring that the network connection between the phone and the AP is not disconnected. After the 50 ms delay on the working channel, the phone can switch to the search state. For example, the phone can search social channels for 626 ms.
[0173] Afterwards, the mobile phone can switch back to the working channel of the mobile STA and repeat the above process. Among them, different electronic devices may have different delay times on the working channel. The embodiment of the present application does not limit the specific delay time of the electronic device on the working channel.
[0174] Improvement 3: In the Wi-Fi P2P protocol, when a mobile phone is searching for channels, it can now search not only social channels but also the working channels of the mobile STA. This means that the channels scanned by the mobile phone in the search state can include: 2.4GHz channel 1, 2.4GHz channel 6, 2.4GHz channel 11, and the working channel of the mobile STA. This increases the probability of the mobile phone discovering the smart TV during screen casting and reduces the time it takes to discover the screen.
[0175] As shown in Figure 12, using a mobile phone connected to an AP on channel 149 in the 5 GHz band as an example, the phone can scan all channels after starting discovery. After completing the full channel scan, the phone can switch to the working channel to maintain the network connection between the phone and the AP. After a 50ms delay on the working channel, the phone can switch to the search state. For example, the phone can search for 626ms on the social channel and the working channel of the mobile STA.
[0176] Afterwards, the mobile phone can switch back to the working channel of the mobile STA and repeat the above process. Among them, different electronic devices may have different delay times on the working channel. The embodiment of the present application does not limit the specific delay time of the electronic device on the working channel.
[0177] In a possible implementation, whether to execute the device discovery method of the embodiment of the present application is determined by obtaining air interface information of a certain channel of the electronic device.
[0178] For example, if the projection display end is a smart TV and the air interface information of channel 1 of the smart TV is obtained, if the device discovery method of the embodiment of the present application is not executed, the air interface information can be queried to find the probe request sent on channel 1 when the smart TV is in the scanning state, and / or the probe request sent on channel 1 when the smart TV is in the search state. In addition, the probe response replied by the other device may also be queried.
[0179] If the device discovery method of the embodiment of the present application is executed, the probe request sent on channel 1 when the smart TV is in the scanning state and / or the probe request sent on channel 1 when the smart TV is in the search state cannot be found in the air interface information. In addition, the probe response sent by the other device cannot be found.
[0180] The following describes the method of the embodiment of the present application in detail through specific embodiments. The following embodiments can be combined with each other or implemented independently, and the same or similar concepts or processes may not be repeated in some embodiments.
[0181] FIG13 shows a device discovery method according to an embodiment of the present application. The method includes:
[0182] S1301: In a first time period, a first electronic device performs channel monitoring, and a second electronic device performs channel scanning.
[0183] In the embodiments of the present application, the first electronic device can be understood as the screen projection display terminal 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 terminal in the wireless screen projection scenario, for example, the second electronic device can be understood as the mobile phone in the above embodiment.
[0184] 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 understood 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.
[0185] Channel monitoring can be understood as the monitoring of the channel by the electronic device in the listening state in the embodiment corresponding to Figure 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 Figure 5.
[0186] S1302: In a second time period, the first electronic device performs channel monitoring, and the second electronic device performs channel monitoring.
[0187] In the embodiment of the present application, 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 understood 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.
[0188] S1303: In a third time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching.
[0189] In the embodiment of the present application, 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 is 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.
[0190] Channel search can be understood as monitoring of the channel by the electronic device when it is in a search state in the embodiment corresponding to FIG. 5 .
[0191] It can be understood that 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. In addition, the channel monitoring performed by the second electronic device in different time periods may also be different. For example, the channels monitored by the second electronic device in different time periods may be different; the channel searches performed by the second electronic device in different time periods may also be different. For example, the channels searched by the second electronic device in different time periods may be different.
[0192] S1304: In a fourth time period, the first electronic device performs channel monitoring, and the second electronic device performs channel monitoring.
[0193] In the embodiment of the present application, 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 is understandable that the duration of the fourth time period can be the same as or different from the duration of the second time period.
[0194] S1305. In a fifth 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.
[0195] In the embodiment of the present application, the fifth time period can be understood as the time period in which the second electronic device performs a channel search, and can also be understood as the duration of the second electronic device performing 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. During the device discovery process, 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 when it is in a listening state. In this way, the first electronic device can be in a listening state for a longer time, which increases the probability of the first electronic device being discovered, reduces the time for screen casting discovery, and thus improves the screen casting experience.
[0196] Optionally, based on the embodiment corresponding to FIG13 , when the first electronic device performs channel monitoring, if the first electronic device is not connected to a wireless access point AP, the first electronic device performs monitoring on a first channel, where the first channel is a social channel.
[0197] In the embodiment of the present application, the first channel may be channel 1, channel 6, or channel 11 of the 2.4 GHz frequency band.
[0198] During the device discovery process, if the first electronic device is not connected to the wireless access point AP, please refer to the relevant description of Case 1 in the above embodiment and the relevant description in the embodiment corresponding to Figure 8 above, and will not be repeated here. The first electronic device has been cyclically listening on the first channel, which can increase the probability of being discovered and shorten the screen projection time.
[0199] Optionally, based on the embodiment corresponding to Figure 13, 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, where the second channel belongs to a social channel.
[0200] In the embodiment of the present application, the second channel may be channel 1, channel 6, or channel 11 of the 2.4 GHz frequency band.
[0201] During the device discovery process, for the case where the first electronic device is connected to the AP of the second channel, reference may be made to the relevant description of Case 2 in the embodiment, which will not be repeated here.
[0202] In this way, 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.
[0203] Optionally, based on the embodiment corresponding to Figure 13, 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, where the third channel belongs to a non-social channel in the 2.4GHz frequency band.
[0204] In the embodiment of the present application, the third channel may be channel 2, channel 3, channel 4, channel 5, channel 7, channel 8, channel 9, channel 10, channel 12 or channel 13 of the 2.4 GHz frequency band.
[0205] If the first electronic device connects to an AP on a non-2.4G social channel, this means the social channel and the first electronic device's operating channel are not on the same channel. The first electronic device then performs a looped listening on the third channel, which increases the probability of being detected. This allows the first electronic device to interact with the AP on the third channel while remaining discoverable, reducing frequent channel switching and improving the first electronic device's online experience.
[0206] Optionally, based on the embodiment corresponding to Figure 13, 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, where the fourth channel belongs to a non-social channel and the fifth channel belongs to a social channel.
[0207] In the embodiment of the present application, during the device discovery process, for the case where the first electronic device is connected to the AP of the fourth channel, reference can be made to the relevant description of Case 3 in the embodiment, and no further details will be given.
[0208] In this way, 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 for most of the time so that the network connected to the first electronic device will not be disconnected, reducing the interface lag of the first electronic device.
[0209] Optionally, based on the embodiment corresponding to Figure 13, the first electronic device supports a dual-band dual-transmit DBDC working mode. 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.
[0210] In the embodiment of the present application, in a scenario where the first electronic device supports the dual-band dual-transmit DBDC operating mode, the switching between dual-antenna operation and single-antenna operation of the first electronic device can refer to the relevant description of monitoring mode 1 in the above embodiment, and will not be repeated here. The switching between dual-antenna operation and single-antenna operation of the first electronic device can ensure that the network rate of the first electronic device does not drop to zero when the first electronic device is in the Wi-Fi P2P monitoring state.
[0211] Optionally, based on the embodiment corresponding to Figure 13, when the first electronic device switches from dual-antenna operation to single-antenna operation, the first electronic device notifies the AP through a Wi-Fi management frame that the first electronic device switches from dual-antenna operation to single-antenna operation; when the first electronic device switches from single-antenna operation to dual-antenna operation, the first electronic device notifies the AP through a Wi-Fi management frame that the first electronic device switches from single-antenna operation to dual-antenna operation.
[0212] In an embodiment of the present application, in a 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.
[0213] It can be understood that 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.
[0214] The first electronic device notifies the AP through a Wi-Fi management frame or other means, 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.
[0215] Optionally, based on the embodiment corresponding to Figure 13, 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.
[0216] In the embodiment of the present application, in a scenario where the first electronic device supports the dual-band dual-transmit (DBDC) operating mode, the first electronic device performs cyclic monitoring on the fourth and fifth channels. For details, refer to the description of monitoring method 1 in the above embodiment, and will not be repeated here. The first electronic device performs cyclic monitoring on the fourth and fifth channels, which not only satisfies the user's Internet experience but also enables rapid discovery of screen projection.
[0217] Optionally, based on the embodiment corresponding to Figure 13, the first electronic device supports the dual-band synchronous DBS working mode. When 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 these two antennas to perform monitoring on the sixth channel, where the sixth channel belongs to the 5GHz frequency band.
[0218] In the embodiment of the present application, in the scenario where the first electronic device supports the dual-band synchronous DBS working mode, the first electronic device can connect to the AP of the sixth channel with reference to the relevant description of monitoring method 2 in the above embodiment, which will not be repeated here. The first electronic device can communicate with the AP and can also continuously monitor the social channel in a loop, so that the Internet access speed of the first electronic device is not reduced while also speeding up the discovery of the screen projection.
[0219] Optionally, based on the embodiment corresponding to Figure 13, before the first time period, it may also include: the second electronic device receives an operation for screen projection.
[0220] In the embodiment of the present application, the operation for screen projection can 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.
[0221] The second electronic device performs channel scanning after receiving the 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 the execution of unnecessary device discovery processes.
[0222] FIG14 shows a device discovery method according to an embodiment of the present application. The method includes:
[0223] S1401: In a first time period, the first electronic device performs channel monitoring, and the second electronic device performs channel scanning.
[0224] In the embodiment of the present application, the first electronic device and the second electronic device can refer to the relevant description in step S1301 of the embodiment corresponding to Figure 13 above, and no further details are given.
[0225] 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 understood 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.
[0226] Channel monitoring and channel scanning can refer to the relevant description in step S1301 of the embodiment corresponding to Figure 13 above, and will not be repeated here.
[0227] S1402: In a second time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching.
[0228] In the embodiment of the present application, 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 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.
[0229] Channel search can refer to the relevant description in step S1301 of the embodiment corresponding to FIG13 above, and will not be repeated here.
[0230] S1403: In a third time period, the first electronic device performs channel monitoring, and the second electronic device performs a task on the working channel of the second electronic device.
[0231] In the embodiment of the present application, 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 for which the second electronic device performs a task on the working channel of the second electronic device. It is 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.
[0232] S1404: In a fourth time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching.
[0233] In the embodiment of the present application, the fourth 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 understood that the duration of the fourth time period can be the same as or different from the duration of the second time period.
[0234] S1405 , in a fifth time period, the first electronic device performs channel monitoring, and the second electronic device performs a task on the working channel of the second electronic device.
[0235] In the embodiment of the present application, the fifth 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 is understood that the duration of the fifth time period can be the same as or different from the duration of the third time period.
[0236] S1406. In a sixth 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.
[0237] In the embodiment of the present application, 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 is understood that the duration of the sixth time period can be the same as or different from the duration of the fourth time period.
[0238] It is understandable that in the embodiment corresponding to Figure 14, the execution steps corresponding to the third and fifth time periods may not be performed. 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.
[0239] During device discovery, the first electronic device can be discovered by the second electronic device while in the listening state, without switching to the scanning or searching state. The second electronic device can discover the first electronic device while remaining in the scanning or searching state, without switching to the listening state. This reduces screen projection time and improves the user experience.
[0240] Optionally, based on the embodiment corresponding to Figure 14, in the second time period, 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.
[0241] In the embodiments of the present application, 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. Please refer to the relevant description in Improvement 2 corresponding to the above embodiment, as well as the relevant description in the embodiment corresponding to Figure 11 above, and no further details will be given.
[0242] 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.
[0243] Optionally, based on the embodiment corresponding to FIG14 , the second electronic device performs a channel search on the social channel and the working channel of the second electronic device.
[0244] In the embodiment of the present application, 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 Figure 12 above, and no further details will be given.
[0245] When the second electronic device is in the search state and performing channel scanning, in addition to searching the social channels, it can also search the working channels of the second electronic device. This can increase the probability of the second electronic device discovering the first electronic device when casting the screen and reduce the casting discovery time.
[0246] Optionally, based on the embodiment corresponding to FIG14 , 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, where the first channel is a social channel.
[0247] In the embodiment of the present application, 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 description of Case 1 in the above embodiment, as well as the description of the embodiment corresponding to FIG8 , which will not be repeated here. The first electronic device continuously monitors the first channel in a loop, which increases the probability of being discovered and shortens the screen projection time.
[0248] Optionally, based on the embodiment corresponding to Figure 14, 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, where the second channel is a social channel.
[0249] In the embodiment of the present application, during the device discovery process, for the case where the first electronic device is connected to the AP of the second channel, reference can be made to the relevant description of Case 2 in the embodiment, and no further details will be given.
[0250] In this way, 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.
[0251] Optionally, based on the embodiment corresponding to Figure 14, 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, where the third channel belongs to a non-social channel in the 2.4GHz frequency band.
[0252] In this embodiment of the present application, if the first electronic device is connected to an AP on a 2.4G non-social channel, this indicates that the social channel and the working channel of the first electronic device are not on the same channel. The first electronic device performs a cyclic monitoring on the third channel, and the first electronic device has a high probability of being scanned. In this way, the first electronic device can both interact with the AP on the third channel and be discovered, which not only reduces frequent channel switching but also improves the Internet experience of the first electronic device.
[0253] Optionally, based on the embodiment corresponding to Figure 14, 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, where the fourth channel belongs to a non-social channel and the fifth channel belongs to a social channel.
[0254] In the embodiment of the present application, during the device discovery process, for the case where the first electronic device is connected to the AP of the fourth channel, reference can be made to the relevant description of Case 3 in the embodiment, and no further details will be given.
[0255] In this way, 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 for most of the time so that the network connected to the first electronic device will not be disconnected, reducing the interface lag of the first electronic device.
[0256] Optionally, based on the embodiment corresponding to Figure 14, before the first time period, it may also include: the second electronic device receives an operation for screen projection.
[0257] In the embodiment of the present application, the operation for screen projection may include an operation of a user clicking a screen projection button, a screen projection triggering operation of a 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 a channel scan after receiving the operation for screen projection. In this way, the second electronic device can start performing a channel scan when the user wants to cast the screen, thereby reducing the execution of unnecessary device discovery processes.
[0258] It should be noted that the first time period in the embodiment corresponding to FIG13 and the first time period in the embodiment corresponding to FIG14 may be different time periods, the second time period in the embodiment corresponding to FIG13 and the second time period in the embodiment corresponding to FIG14 may be different time periods, the third time period in the embodiment corresponding to FIG13 and the third time period in the embodiment corresponding to FIG14 may be different time periods, 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, and 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. In other words, 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 to be understood only in the context of their respective embodiments.
[0259] In addition, the first channel in the embodiment corresponding to FIG13 and the first channel in the embodiment corresponding to FIG14 may be different channels, the second channel in the embodiment corresponding to FIG13 and the second channel in the embodiment corresponding to FIG14 may be different channels, the third channel in the embodiment corresponding to FIG13 and the third channel in the embodiment corresponding to FIG14 may be different channels, the fourth channel in the embodiment corresponding to FIG13 and the fourth channel in the embodiment corresponding to FIG14 may be different channels, and the fifth channel in the embodiment corresponding to FIG13 and the fifth channel in the embodiment corresponding to FIG14 may be different channels. In other words, the concepts of the first channel, the second channel, the third channel, the fourth channel, and the fifth channel are to be understood only in the context of their respective embodiments.
[0260] FIG15 shows a device discovery method according to an embodiment of the present application. The method includes:
[0261] S1501: The first electronic device continuously performs channel monitoring.
[0262] In the embodiment of the present application, the first electronic device can refer to the relevant description in step S1301 of the embodiment corresponding to Figure 13 above, and no further details are given.
[0263] Channel monitoring can refer to the relevant description in step S1301 of the embodiment corresponding to Figure 13 above, and will not be repeated here.
[0264] S1502: When the second electronic device performs device discovery, the second electronic device cyclically performs channel monitoring and channel search after performing channel scanning, or the second electronic device continuously performs channel search after performing channel scanning.
[0265] In the embodiment of the present application, the second electronic device can refer to the relevant description of step S1301 in the embodiment corresponding to FIG13 above, and will not be repeated. Channel scanning and channel searching can refer to the relevant description of step S1301 in the embodiment corresponding to FIG13 above, and will not be repeated.
[0266] During the device discovery process, 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. Optionally, the second electronic device does not need to switch to the listening state. It only needs to remain in the scanning state or the searching state to discover the first electronic device. This can reduce the screen projection time and improve the user experience.
[0267] Optionally, based on the embodiment corresponding to Figure 15, when the first electronic device continues to perform channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device continues to perform channel monitoring on the first channel, where the first channel belongs to a social channel.
[0268] In the embodiment of the present application, 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 description of Case 1 in the above embodiment, as well as the description of the embodiment corresponding to FIG8 , which will not be repeated here. The first electronic device continuously monitors the first channel in a loop, which increases the probability of being discovered and shortens the screen projection time.
[0269] Optionally, based on the embodiment corresponding to Figure 15, when the first electronic device continues to perform channel monitoring, if the first electronic device is connected to the AP of the second channel, the first electronic device continues to perform channel monitoring on the second channel, where the second channel belongs to a social channel.
[0270] In the embodiment of the present application, during the device discovery process, for the case where the first electronic device is connected to the AP of the second channel, reference can be made to the relevant description of Case 2 in the embodiment, and no further details will be given.
[0271] In this way, 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.
[0272] Optionally, based on the embodiment corresponding to Figure 15, when the first electronic device continues to perform channel monitoring, if the first electronic device is connected to the AP of the 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.4GHz frequency band.
[0273] In this embodiment of the present application, if the first electronic device is connected to an AP on a 2.4G non-social channel, this indicates that the social channel and the working channel of the first electronic device are not on the same channel. The first electronic device performs a cyclic monitoring on the third channel, and the first electronic device has a high probability of being scanned. In this way, the first electronic device can both interact with the AP on the third channel and be discovered, which not only reduces frequent channel switching but also improves the Internet experience of the first electronic device.
[0274] Optionally, based on the embodiment corresponding to Figure 15, 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, where the fourth channel belongs to a non-social channel and the fifth channel belongs to a social channel.
[0275] In the embodiment of the present application, during the device discovery process, for the case where the first electronic device is connected to the AP of the fourth channel, reference can be made to the relevant description of Case 3 in the embodiment, and no further details will be given.
[0276] In this way, 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 for most of the time so that the network connected to the first electronic device will not be disconnected, reducing the interface lag of the first electronic device.
[0277] It should be noted that the first channel in the embodiment corresponding to FIG14 and the first channel in the embodiment corresponding to FIG15 may be different channels, the second channel in the embodiment corresponding to FIG14 and the second channel in the embodiment corresponding to FIG15 may be different channels, the third channel in the embodiment corresponding to FIG14 and the third channel in the embodiment corresponding to FIG15 may be different channels, the fourth channel in the embodiment corresponding to FIG14 and the fourth channel in the embodiment corresponding to FIG15 may be different channels, and the fifth channel in the embodiment corresponding to FIG14 and the fifth channel in the embodiment corresponding to FIG15 may be different channels. In other words, the concepts of the first channel, the second channel, the third channel, the fourth channel, and the fifth channel are to be understood only in the context of their respective embodiments.
[0278] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0279] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the method steps of each example described in the embodiment disclosed herein, 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 a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0280] The embodiment of the present application can divide the functional modules of the device implementing the method according to the above method example. For 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 in the form of 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. In actual implementation, there may be other division methods.
[0281] 16 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.
[0282] In some embodiments, the memory 1604 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
[0283] 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. During the implementation process, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 1601 or an instruction in the form of software. The above-mentioned 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.
[0284] The steps of the method disclosed in the embodiments of the present application can be directly implemented as being executed by a hardware decoding processor, or can be implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, 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 performs the steps of the above method in combination with its hardware.
[0285] The processor 1601 , the memory 1604 , and the communication interface 1603 can communicate with each other via the communication line 1602 .
[0286] In the above embodiment, 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 downloaded and installed in the memory in the form of software.
[0287] The present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can 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. For example, the available medium can include magnetic media (e.g., floppy disk, hard disk or tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)).
[0288] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part via software, hardware, firmware, or any combination thereof. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one location to another. The storage medium can be any target medium that can be accessed by a computer.
[0289] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM, or other optical disc storage; computer-readable media may include magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of 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 typically reproduce data magnetically, while discs reproduce data optically using lasers.
[0290] The present application embodiment is described with reference to the flow chart and / or block diagram according to the method, device (system) and computer program product of the embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processing unit of general-purpose computer, special-purpose computer, embedded processing machine or other programmable data processing equipment to produce a machine, so that the instruction executed by the processing unit of computer or other programmable data processing equipment produces the device for realizing the function specified in one flow chart flow chart or multiple flow charts and / or one block or multiple blocks of block diagram.
Claims
1. A device discovery method, characterized in that: Applied to a device discovery system, the device discovery system includes a first electronic device and a second electronic device for device discovery, the method includes: In a first time period, the first electronic device performs channel monitoring, and the second electronic device performs channel scanning; In a second time period, the first electronic device performs channel monitoring, and the second electronic device performs channel monitoring; In a third time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching; In a fourth time period, the first electronic device performs channel monitoring, and the second electronic device performs channel monitoring; In a fifth time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching; 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.
2. The method according to claim 1, characterized in that When the first electronic device performs channel monitoring, if the first electronic device is not connected to a wireless access point AP, the first electronic device performs monitoring on a first channel, wherein the first channel belongs to a social channel.
3. The method according to claim 1 or 2, characterized in that: When the first electronic device performs channel monitoring, if the first electronic device is connected to an AP of a second channel, the first electronic device performs monitoring on the second channel, wherein the second channel belongs to the social channel.
4. The method according to any one of claims 1 to 3, characterized in that: When the first electronic device performs channel monitoring, if the first electronic device is connected to an AP of a third channel, the first electronic device performs monitoring on the third channel, wherein the third channel belongs to a non-social channel in a 2.4 GHz frequency band.
5. The method according to any one of claims 1 to 3, characterized in that: 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 the non-social channel and the fifth channel belongs to the social channel.
6. The method according to claim 5, characterized in that The first electronic device supports a dual-band dual-transmit DBDC working mode. 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.
7. The method according to claim 6, characterized in that When the first electronic device switches from dual-antenna operation to single-antenna operation, the first electronic device notifies the AP through a Wi-Fi management frame that the first electronic device switches from dual-antenna operation to single-antenna operation; When the first electronic device switches from working with a single antenna to working with dual antennas, the first electronic device notifies the AP through the Wi-Fi management frame that the first electronic device switches from working with a single antenna to working with dual antennas.
8. The method according to claim 5, characterized in that The first electronic device supports a dual-band dual-transmit DBDC working mode. 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 the 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 an antenna to The fourth channel is used to communicate with the AP, and another antenna is used to perform monitoring on the fifth channel.
9. The method according to any one of claims 1 to 8, characterized in that: The first electronic device supports a dual-band synchronous DBS working mode. When the first electronic device performs channel monitoring, if the first electronic device is connected to an AP of a 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 a channel in the 5 GHz frequency band.
10. The method according to any one of claims 1 to 9, characterized in that: Before the first time period, it also includes: The second electronic device receives an operation for screen projection.
11. A device discovery method, characterized in that: Applied to a device discovery system, the device discovery system includes a first electronic device and a second electronic device for device discovery, the method includes: In a first time period, the first electronic device performs channel monitoring, and the second electronic device performs channel scanning; In a second time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching; In a third 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; In a fourth time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching; 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; In a sixth time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching; 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.
12. The method according to claim 11, characterized in that In the second time period, 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. In the sixth time period, the second electronic device performs a channel search on the working channel of the second electronic device.
13. The method according to claim 11, characterized in that The second electronic device performs a channel search on a social channel and an operating channel of the second electronic device.
14. The method according to any one of claims 11 to 13, characterized in that: When the first electronic device performs channel monitoring, if the first electronic device is not connected to a wireless access point AP, the first electronic device performs monitoring on a first channel, wherein the first channel belongs to a social channel.
15. The method according to any one of claims 11 to 14, characterized in that: When the first electronic device performs channel monitoring, if the first electronic device is connected to an AP of a second channel, the first electronic device performs monitoring on the second channel, wherein the second channel belongs to the social channel.
16. The method according to any one of claims 11 to 15, characterized in that: When the first electronic device performs channel monitoring, if the first electronic device is connected to an AP of a third channel, the first electronic device performs monitoring on the third channel, wherein the third channel belongs to a non-social channel in a 2.4 GHz frequency band.
17. The method according to any one of claims 11 to 15, characterized in that: 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 the non-social channel and the fifth channel belongs to the social channel.
18. The method according to any one of claims 11 to 17, characterized in that: Before the first time period, it also includes: The second electronic device receives an operation for screen projection.
19. A device discovery method, characterized in that: Applied to a device discovery system, the device discovery system includes a first electronic device and a second electronic device for device discovery, the method includes: The first electronic device continuously performs channel monitoring; 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.
20. The method according to claim 19, characterized in that When the first electronic device continuously performs channel monitoring, if the first electronic device is not connected to a 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.
21. The method according to any one of claims 19-20, characterized in that: When the first electronic device continuously performs channel monitoring, if the first electronic device is connected to an AP of a second channel, the first electronic device continuously performs channel monitoring on the second channel, wherein the second channel belongs to the social channel.
22. The method according to any one of claims 19 to 21, characterized in that: When the first electronic device continuously performs channel monitoring, if the first electronic device is connected to an AP of a third channel, the first electronic device continuously performs channel monitoring on the third channel, wherein the third channel belongs to a non-social channel in a 2.4 GHz frequency band.
23. The method according to any one of claims 19 to 21, characterized in that: When the first electronic device continuously performs 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 the non-social channel and the fifth channel belongs to the social channel.
24. An electronic device, characterized in that: include: A memory and a processor, the memory being used to store a computer program, the processor being used to execute the computer program to execute the method executed by the first electronic device in the method described in any one of claims 1-23, or to execute the method executed by the second electronic device in the method described in any one of claims 1-23.
25. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed, enable the computer to execute the method executed by the first electronic device in any one of the methods described in claims 1-23, or to execute the method executed by the second electronic device in any one of the methods described in claims 1-23.
26. A computer program product, characterized in that It includes a computer program, which, when executed, enables an electronic device to execute the method executed by the first electronic device in any one of the methods described in claims 1-23, or to execute the method executed by the second electronic device in any one of the methods described in claims 1-23.
27. A device discovery system, characterized in that: include: A first electronic device and a second electronic device, wherein the first electronic device is used to execute the method executed by the first electronic device in the method described in any one of claims 1-23, and the second electronic device is used to execute the method executed by the second electronic device in the method described in any one of claims 1-23.