Equipment discovery method and related device

By allowing the smart TV to be in a monitoring state during the discovery process of wireless Miracast screen projection device, the problem of device discovery time is solved, and the screen projection experience and network stability are improved.

CN119155668APending Publication Date: 2024-12-17HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310717557.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

During the discovery process of wireless Miracast screen projection device, the discovery time of devices based on Wi-Fi P2P protocol is longer, reducing the user experience.

Method used

During the discovery process of smart TV, it does not need to switch to the scanning state or search state. It can be discovered by the mobile phone when it is in the monitoring state. By cyclically monitoring on social channels or non-social channels, the probability of being discovered is increased and the time for screen projection is reduced. .

Benefits of technology

It increases the probability of smart TV being discovered, shortens screen projection discovery time, improves user experience, and reduces frequent channel switching and interface lags.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155668A_ABST
    Figure CN119155668A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a device discovery method and a related device, and relates to the technical field of communication. The method comprises the following steps: in a device discovery process of wireless Miracast screen projection, since the smart television does not need to discover a mobile phone, in the device discovery process, the smart television does not need to be switched to a scanning state or a searching state, and the smart television can be discovered by the mobile phone when in a monitoring state. Thus, the smart television can be in the monitoring state for a long time, the probability that the smart television is found is increased, the time for screen projection finding is shortened, and thus the screen projection experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a device discovery method and related apparatus. Background Art

[0002] 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 wireless fidelity (Wi-Fi) peer to peer (P2P) protocol can be paired with electronic device B that supports Wi-Fi P2P protocol. After the two electronic devices are successfully paired, the screen content of electronic device A can be projected to the interface of electronic device B.

[0003] However, in the device discovery process based on the Wi-Fi P2P protocol, the discovery time of the electronic device is relatively long, which reduces the user experience. Summary of the invention

[0004] In the device discovery method and related apparatus provided in the embodiment of the present application, in the device discovery process of wireless Miracast screen projection, since the smart TV does not need to discover the mobile phone, the smart TV does not need to switch to the scanning state or the searching state in the device discovery process based on the Wi-Fi P2P protocol, and the smart TV can be discovered by the mobile phone in the listening state. In this way, the smart TV can be in the listening state for a longer time, increasing the probability of the smart TV being discovered, reducing the time of screen projection discovery, and thus improving the screen projection experience.

[0005] In a first aspect, an embodiment of the present application provides a device discovery method, the method comprising:

[0006] 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, and the time for screen casting to be discovered can be reduced, thereby improving the screen casting experience.

[0007] In a possible implementation, when the first electronic device performs channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device performs monitoring on the first channel, where the first channel belongs to the social channel. In this way, the first electronic device keeps monitoring on the first channel in a loop, which can increase the probability of being discovered and shorten the screen projection time.

[0008] In one possible implementation, 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. In this way, frequent channel switching is reduced, the probability of the first electronic device being discovered is increased, the screen projection time is shortened, and the Internet experience of the first electronic device is improved.

[0009] In a possible implementation, when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the third channel, the first electronic device performs monitoring on the third channel, wherein the third channel belongs to a non-social channel in the 2.4 GHz frequency band. In this way, frequent channel switching is reduced and the Internet experience of the first electronic device is improved.

[0010] In a possible implementation, 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 is a non-social channel and the fifth channel is a social channel. In this way, the network connected to the first electronic device will not be disconnected, and the interface freeze of the first electronic device is reduced.

[0011] In a 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 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. In this way, the switching of the first electronic device between dual-antenna operation and single-antenna operation can ensure that the network rate of the first electronic device will not drop to zero when the first electronic device is in the Wi-Fi P2P monitoring state.

[0012] In a possible implementation, 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. In this way, after the first electronic device switches the antenna, the data transmission and reception between the first electronic device and the AP will not be affected.

[0013] In a 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 satisfied and the rapid discovery of screen projection can be achieved.

[0014] In a possible implementation, 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 two antennas to perform monitoring on the sixth channel, wherein 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.

[0015] In a possible implementation, before the first time period, the second electronic device also includes: receiving an operation for screen projection. In this way, the second electronic device can start channel scanning when the user wants to project the screen, thereby reducing unnecessary device discovery processes.

[0016] In a second aspect, the device discovery method provided by the embodiment of the present application includes:

[0017] 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, and the time for screen casting discovery can be reduced, thereby improving the screen casting experience.

[0018] In a possible implementation, 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. In this way, the probability of the second electronic device finding the first electronic device when casting the screen can be increased, and the casting discovery time can be reduced.

[0019] In a possible implementation, the second electronic device performs a channel search in the social channel and the working channel of the second electronic device. In this way, the probability of the second electronic device finding the first electronic device when casting the screen can be increased, and the casting discovery time can be reduced.

[0020] In a possible implementation, when the first electronic device performs channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device performs monitoring on the first channel, where the first channel belongs to the social channel. In this way, the first electronic device keeps monitoring on the first channel in a loop, which can increase the probability of being discovered and shorten the screen projection time.

[0021] In one possible implementation, 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. In this way, frequent channel switching is reduced, the probability of the first electronic device being discovered is increased, the screen projection time is shortened, and the Internet experience of the first electronic device is improved.

[0022] In a possible implementation, when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the third channel, the first electronic device performs monitoring on the third channel, wherein the third channel belongs to a non-social channel in the 2.4 GHz frequency band. In this way, frequent channel switching is reduced and the Internet experience of the first electronic device is improved.

[0023] In a possible implementation, 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 is a non-social channel and the fifth channel is a social channel. In this way, the network connected to the first electronic device will not be disconnected, and the interface freeze of the first electronic device is reduced.

[0024] In a possible implementation, before the first time period, the second electronic device also includes: receiving an operation for screen projection. In this way, the second electronic device can start channel scanning when the user wants to project the screen, thereby reducing unnecessary device discovery processes.

[0025] In a third aspect, the device discovery method provided by the embodiment of the present application includes:

[0026] The first electronic device continuously performs channel monitoring; when the second electronic device performs device discovery, the second electronic device performs channel monitoring and channel search in a loop after performing channel scanning, or the second electronic device continuously performs channel search after performing channel scanning. In this way, the probability of the first electronic device being discovered can be increased, and the time for screen casting discovery can be reduced, thereby improving the screen casting experience.

[0027] In a possible implementation, 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. In this way, the first electronic device continuously performs cyclic monitoring on the first channel, which can increase the probability of being discovered and shorten the screen projection time.

[0028] In one possible implementation, when the first electronic device continuously performs channel monitoring, if the first electronic device is connected to the AP of the second channel, the first electronic device continuously performs channel monitoring on the second channel, wherein the second channel belongs to a social channel. In this way, frequent channel switching is reduced, the probability of the first electronic device being discovered is increased, the screen projection time is shortened, and the Internet experience of the first electronic device is improved.

[0029] In a possible implementation, 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 the 2.4 GHz frequency band. In this way, frequent channel switching is reduced and the Internet experience of the first electronic device is improved.

[0030] In a possible implementation, 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 performs channel monitoring on the fourth channel and the fifth channel in a cycle, wherein the fourth channel is a non-social channel and the fifth channel is a social channel. In this way, the network connected to the first electronic device will not be disconnected, and the interface freeze of the first electronic device is reduced.

[0031] 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. Among them, 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.

[0032] Exemplarily, the first electronic device is used to perform channel monitoring, which specifically includes monitoring on a first channel, monitoring on a second channel, monitoring on a third channel, performing cyclic monitoring on a fourth channel and a fifth channel, and monitoring on a sixth channel.

[0033] The first electronic device is further used to switch from dual-antenna operation to single-antenna operation, and from single-antenna operation to dual-antenna operation, and is further used to notify the AP through a Wi-Fi management frame.

[0034] The first electronic device is also used to communicate with the AP on the fourth channel using two antennas and to monitor the fourth channel using two antennas; it is also used to communicate with the AP on the fourth channel using one antenna and to monitor the fifth channel using another antenna; it is also used to communicate with the AP on the sixth channel using two antennas and to monitor the sixth channel using two antennas.

[0035] The second electronic device is used to perform channel scanning, perform channel searching, and perform tasks on the working channel of the second electronic device.

[0036] The second electronic device is further configured to perform a channel search on a working channel of the second electronic device, and is further configured to perform a channel search on a social channel and a working channel of the second electronic device.

[0037] The second electronic device is also used to receive an operation for screen projection.

[0038] 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.

[0039] 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.

[0040] 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, 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.

[0041] In an eighth aspect, the present application provides a chip or a chip system, the chip or chip system 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.

[0042] In a possible implementation, the chip or chip system described above in the present application further includes at least one memory, in which instructions are stored. The memory may be a storage unit inside 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.).

[0043] 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 here. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0045] Figure 2 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0046] Figure 3 A schematic diagram of a usage scenario of wireless Miracast screen projection provided in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of a wireless screen projection window of a smart TV provided in an embodiment of the present application;

[0048] Figure 5 A schematic diagram of a device discovery process based on the Wi-Fi P2P protocol provided in an embodiment of the present application;

[0049] Figure 6A schematic diagram of the time consumption of channel monitoring provided in an embodiment of the present application;

[0050] Figure 7 A schematic diagram of the impact of a device discovery process on data transmission of a site provided in an embodiment of the present application;

[0051] Figure 8 A schematic diagram of a scenario of a device discovery method provided in an embodiment of the present application;

[0052] Fig. 9 A schematic diagram of another device discovery method provided in an embodiment of the present application;

[0053] Fig.10 A schematic diagram of an extended scenario of a device discovery method provided in an embodiment of the present application;

[0054] Fig.11 A schematic diagram of an improved screen projection source end of a device discovery method provided in an embodiment of the present application;

[0055] Fig.12 A schematic diagram of an improved screen projection source end of another device discovery method provided in an embodiment of the present application;

[0056] Fig.13 A schematic diagram of a device discovery method provided in an embodiment of the present application;

[0057] Fig.14 A schematic diagram of another device discovery method provided in an embodiment of the present application;

[0058] Fig.15 A schematic diagram of another device discovery method provided in an embodiment of the present application;

[0059] Fig.16 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to clearly describe the technical solutions of the embodiments of the present application, some terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0061] 1. Social channel: The social channel includes channel 1, channel 6 and channel 11 of the 2.4 GHz frequency band. The social channel can also be called a regular channel.

[0062] 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.

[0063] 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.

[0064] 4. Non-social channels: including non-social channels in the 2.4 GHz frequency band and channels in the 5 GHz frequency band. Non-social channels can also be called unconventional channels.

[0065] 5. Operating channel: The operating channel can be understood as the channel when the electronic device is connected to the wireless access point (AP) as a station (STA). The operating channel can also be called the operating channel.

[0066] 6. Terminology

[0067] In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same functions and effects. For example, the first chip and the second chip are only used to distinguish different chips, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0068] It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0069] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" 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: A exists alone, A and B exist at the same time, and B exists 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" or similar expressions refers to any combination of these items, including any combination of single 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.

[0070] 7. Electronic devices

[0071] 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 are: 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, 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, vehicle-mounted devices, wearable devices, electronic devices in 5G networks or future evolved public land mobile communication networks (PLANs). The electronic devices in the network (PLMN) and the like are not limited to this in the embodiments of the present application.

[0072] As an example but not 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 powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices 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 types of smart bracelets and smart jewelry for vital sign monitoring.

[0073] In addition, in the embodiments of the present application, the electronic device may also be an electronic device in an 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 that interconnects people and machines and things.

[0074] 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.

[0075] In an embodiment 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 a memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0076] For example, Figure 1 A schematic structural diagram of an electronic device is shown.

[0077] 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.

[0078] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0079] 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 processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0080] 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.

[0081] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0082] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.

[0083] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on 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.

[0084] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may 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 may 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 may be executed.

[0085] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.

[0086] The wireless communication module 160 can provide wireless communication solutions 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., which are applied to electronic devices. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via an antenna, 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, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna.

[0087] The wireless communication module 160 may include a Wi-Fi module. The Wi-Fi module may be used to transmit data. Exemplarily, the working modes of the Wi-Fi module may include dual band dual concurrent (DBDC) and dual band simultaneous (DBS).

[0088] DBDC means that an electronic device can support two working frequency bands and can use both working frequency bands for Wi-Fi connection at the same time. For example, if the 2.4GHz band and the 5GHz band are dual-transmitted, the electronic device can establish Wi-Fi connection on the 2.4GHz band and the 5GHz band respectively. A DBDC device can have two antennas, one antenna can be used for the 5GHz band, and the other antenna can be used for the 2.4GHz band.

[0089] DBS means that an electronic device can support two working frequency bands and can use both working frequency bands for Wi-Fi connection at the same time. For example, if the 2.4GHz band and the 5GHz band are dual-transmitted, the electronic device can establish Wi-Fi connection on the 2.4GHz band and the 5GHz band respectively. A DBS device can have two antennas, two antennas can be used for the 5GHz band, and these two antennas can also be used for the 2.4GHz band.

[0090] In some implementations, the electronic device may use a single input single output (SISO) mode 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*15GHz, 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 mode is equivalent to one Wi-Fi connection corresponding to one antenna, that is, corresponding to one data stream.

[0091] In some other implementations, the electronic device may use a multiple input multiple output (MIMO) method for data transmission. Exemplarily, when the 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 frequency band, and the Wi-Fi module in the electronic device can also use the above two antennas for data transmission in the 5GHz frequency band. That is to say, 2*2 2.4GHz+2*2 5GHz, where the first 2 in 2*2 represents 2 transmitting antennas, and the second 2 represents 2 receiving antennas. It can be understood that the MIMO method is equivalent to a Wi-Fi connection corresponding to 2 antennas, that is, corresponding to two data streams, and the transmission rate of the two data streams can be twice the transmission rate of one data stream.

[0092] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1. The electronic device implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the 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.

[0093] Figure 2It is a software structure block diagram of the electronic device of the embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, the hardware abstraction layer, and the kernel layer.

[0094] The application layer can include a series of application packages. Figure 2 As shown, the application package may include applications such as video, music, browser, etc. Applications may include system applications and third-party applications.

[0095] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0096] like Figure 2 As shown, the application framework layer may include a window manager, a resource manager, a notification manager, a content provider, a view system, and the like.

[0097] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, touch the screen, drag the screen, capture the screen, etc.

[0098] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0099] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type 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.

[0100] Content providers are used to implement data sharing between different applications, allowing one program to access data in another program while ensuring the security of the accessed data.

[0101] The view system can be responsible for the application interface drawing and event processing.

[0102] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0103] 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.

[0104] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection. For example, in an embodiment of the present application, the virtual machine can be used to perform functions such as screen projection display of an electronic device and device discovery process based on the Wi-Fi P2P protocol.

[0105] The system library can also be called the Native layer, which can include multiple functional modules, such as media libraries, function libraries, and graphics processing libraries (such as OpenGL ES).

[0106] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0107] The function library provides developers with API interfaces for multiple services, making it easy for developers to quickly integrate and implement various functions.

[0108] The graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.

[0109] The hardware abstraction layer is an abstracted structure between the kernel layer and the Android runtime. The hardware abstraction layer can be a package of the hardware driver, providing a unified interface for the call of the upper layer application. For example, in the embodiment of the present application, the hardware abstraction layer may include a Wpa_supplicant module, which can be used to perform logical control of monitoring, scanning, etc. of the Wi-Fi P2P protocol.

[0110] The kernel layer is a layer between hardware and software. The kernel layer may include Wi-Fi drivers, display drivers, audio drivers, Bluetooth drivers, etc. For example, in an embodiment of the present application, the Wi-Fi driver may be used to scan, monitor, or search for channels.

[0111] 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.

[0112] 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.

[0113] The following takes 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.

[0114] Figure 3 300 is a drop-down menu interface of a mobile phone, and the drop-down menu interface 300 may include multiple function switches, such as a network switch, a Bluetooth switch, a flashlight switch, etc. The drop-down menu interface 300 may also include a wireless screen projection switch 301. Among them, wireless screen projection may also be called mobile screen projection, smart screen projection, etc.

[0115] When the user clicks the wireless screen projection switch 301, the mobile phone can display the following Figure 3 The interface 302 of b is displayed, and the mobile phone can find nearby devices that can be projected. The interface 302 can display a wireless projection dialog box 303, which can include prompt information, a cancel button and a view help button, wherein the prompt information may include "Searching for available devices...", the cancel button can be used to cancel the wireless projection, and the view help button can be used to view help information related to the wireless projection.

[0116] When the phone finds a nearby available screen projection device, it can display Figure 3 The interface 304 of c can display an available device dialog box 305. The available device dialog box 305 can include an available device list, a cancel button, and a view help button, wherein the available device list can include available device icons and available device names, the cancel button can be used to cancel wireless screen projection, and the view help button can be used to view help information related to wireless screen projection.

[0117] For example, when the user selects available device 1, Figure 4 As shown, the available device 1 may be a smart TV, and a wireless screen projection window 401 may be displayed in the interface 400 of the smart TV. It is understandable that when the smart TV displays the wireless screen projection window 401, the user cannot continue to watch the video playback, etc., so the user may not feel the interface freeze of the smart TV, thereby improving the user experience.

[0118] The wireless screen projection window 401 may include prompt information, an accept button, and a cancel button, wherein the prompt information may include "XX device wants to project the screen, do you accept it?" The accept button may be used to accept the screen projection request of the mobile phone, and the cancel button may be used to cancel the screen projection request of the mobile phone. When the user triggers the accept button, the screen content of the mobile phone can be projected onto the interface of the smart TV, and when the user triggers the cancel button, the screen content of the mobile phone cannot be projected onto the interface of the smart TV.

[0119] 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.

[0120] 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, so both the mobile phone and the smart TV can perform the device discovery process based on the Wi-Fi P2P protocol.

[0121] The following takes the smart TV as P2P device 1 as an example. Figure 5 The device discovery process based on the Wi-Fi P2P protocol is shown.

[0122] When the smart TV starts to discover, the smart TV can perform full channel scanning. At this time, the smart TV is in a scanning state, which is in the scanning stage in the Wi-Fi P2P protocol. The full channel scanning can perform device scanning by sending a probe request on a channel in the 2.4 GHz band and a channel in the 5 GHz band.

[0123] 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 listened to. It is understandable that when the smart TV selects a channel, the subsequent listened channel will not change. When the smart TV starts to discover again next time, the smart TV can reselect any channel in the social channel as the channel to be listened to. When the smart TV is in the listening state, the smart TV can be discovered by P2P device 2. For the convenience of description, the mobile phone will be described as P2P device 2 in the following.

[0124] 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.

[0125] It is understandable that the smart TV can subsequently cycle between the listening state and the searching state. For example, after the searching state, the smart TV can enter the listening state again, and after the listening state, the smart TV can enter the searching state again. The listening state and the searching state are both in the discovery phase of the Wi-Fi P2P protocol.

[0126] like Figure 5 As shown, when the smart TV is in the listening state for the first time, the channel monitored is channel 1 of the 2.4GHz frequency band, and the listening time is 200TU. When the smart TV is in the listening state for the second time, the channel monitored is still channel 1, and the listening time can be 100TU. When a mobile phone is in the scanning state and scans channel 1, the mobile phone can discover the smart TV, or when a mobile phone is in the searching state and scans channel 1, the mobile phone can discover the smart TV. In other words, if a mobile phone wants to discover a smart TV, the mobile phone needs to be in the scanning state or the searching state, the smart TV needs to be in the listening state, and the channel scanned or searched by the mobile phone is the same channel as the channel monitored by the smart TV. However, such a discovery process makes it take a long time for the smart TV to be discovered, which reduces the user experience.

[0127] Possible scenarios, such as Figure 6 As shown, after the smart TV starts to discover, it can perform a full channel scan. For example, it takes about 3.4 seconds for the smart TV to scan 26 channels. After completing the full channel scan, the smart TV can switch to the listening state. For example, the smart TV can listen to 6 channels for 307 milliseconds (ms). After the listening state, the smart TV can switch to the working channel. For example, the working channel can be channel 149 in the 5GHz frequency band. The smart TV can communicate data with the AP on the working channel, so that the network between the smart TV and the AP will not be disconnected. After a delay of 50ms on the working channel, the smart TV can switch to the search state. For example, the smart TV can search for 626ms on the social channel.

[0128] Afterwards, the smart TV can switch back to the monitoring state and execute the above process repeatedly. Among them, different electronic devices may have different delay durations in the working channel. For example, the delay duration of some electronic devices in the working channel may be about 100ms. The embodiment of the present application does not limit the specific delay duration of the electronic device in the working channel.

[0129] It is understandable that the above Figure 6Each cycle of the process shown can take more than 900 milliseconds. Among them, only 307ms of the smart TV is in a state where it can be discovered by the mobile phone, which makes it difficult for the smart TV to be discovered and increases the time it takes for the smart TV to be discovered. In addition, only 50ms of the smart TV can communicate with the AP, which makes the network of the smart TV worse and reduces the user experience.

[0130] In the above Figure 6 In the process of the smart TV switching to the working channel, if the smart TV is connected to the AP of the non-social channel as a STA, the process of the smart TV being discovered based on the Wi-Fi P2P protocol can have a significant impact on the data transmission of the site. Figure 7 Take the example of connecting a smart TV to channel 149 of the 5GHz frequency band of a router.

[0131] like Figure 7 As shown in the figure, the data transmission rate between the smart TV and the router is about 350Mbps, which is relatively high. However, at about 21 seconds, because the smart TV wants to be discovered by the mobile phone, the smart TV needs to switch from channel 149 in the 5GHz band to the social channel in the 2.4GHz band for monitoring. At this time, the data transmission rate between the smart TV and the router may drop to about 70Mbps, which is relatively low, and the interface of the smart TV may freeze. Therefore, the process of smart TV being discovered based on the Wi-Fi P2P protocol can have a significant impact on the data transmission of the site.

[0132] In view of this, the device discovery method provided in the embodiment of the present application, in the device discovery process of wireless Miracast screen projection, since the smart TV does not need to discover the mobile phone, the smart TV does not need to switch to the scanning state or the searching state in the device discovery process based on the Wi-Fi P2P protocol, and the smart TV can be discovered by the mobile phone in the listening state. In this way, the smart TV can be in the listening state for a longer time, increasing the probability of the smart TV being discovered, reducing the time of screen projection discovery, and thus improving the screen projection experience.

[0133] In a possible implementation, the device discovery method in the embodiment of the present application may include the following three cases:

[0134] 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 cyclic monitoring.

[0135] like Figure 8As shown, taking the example of a smart TV selecting channel 1 of the 2.4GHz frequency band as the monitoring channel, after the smart TV starts to discover, it can keep monitoring on channel 1 in a loop. In this way, the probability of the smart TV being discovered can be increased and the screen projection time can be shortened.

[0136] It is understandable that when the smart TV STA is not connected to the 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 discovered state and can be discovered by other devices at any time without the user having to perform complex operations, thereby improving the user experience. Alternatively, the smart TV can start the device discovery process based on the Wi-Fi P2P protocol when entering the wireless screen projection window. In this way, the smart TV can be in a discovered state when the user wants to project the screen, reducing the execution of unnecessary device discovery processes.

[0137] 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.

[0138] That is to say, in the device discovery process based on the Wi-Fi P2P protocol, if the smart TV STA is connected to the AP of the social channel, it means that the working channel of the smart TV STA is a channel in the social channel, and the smart TV does not need to perform channel switching. The smart TV can use the connected social channel as the channel monitored by the smart TV in the monitoring state.

[0139] For example, if the smart TV STA is connected to channel 1 of the AP's 2.4 GHz frequency band, then situation 2 can be as described above. Figure 8 As shown in the figure, after the smart TV starts to discover, it can keep looping and listening on channel 1. In this way, the smart TV can interact with the AP on channel 1 and be in a discoverable state, thereby reducing frequent channel switching, increasing the probability of the smart TV being discovered, shortening the screen projection time, and improving the Internet experience of the smart TV.

[0140] Case 3: If the smart TV STA is connected to an AP of a non-social channel, the smart TV performs Wi-Fi P2P loop monitoring on the social channel and the smart TV STA working channel. Optionally, if the smart TV STA is connected to an AP of a 2.4G non-social channel, the smart TV can also perform Wi-Fi P2P loop monitoring on the smart TV STA working channel.

[0141] That is to say, in the device discovery process based on the Wi-Fi P2P protocol, if the smart TV STA is connected to an AP in a non-social channel, it means that the social channel and the working channel of the smart TV STA are not in the same channel. For example, the working channel of the smart TV STA is channel 149 in the 5GHz band, and the social channel is channel 1 in the 2.4GHz band. At this time, the smart TV can perform cyclic monitoring on the social channel and the working channel of the smart TV STA.

[0142] If the smart TV STA is connected to an AP on a 2.4G non-social channel, it means that the social channel and the working channel of the smart TV STA are not on the same channel. For example, the working channel of the smart TV STA is channel 3 of the 2.4GHz band, and the social channel is channel 1 of the 2.4GHz band. At this time, the smart TV can perform loop monitoring on channel 3. When the mobile phone performs a full channel scan, since the smart TV is always on channel 3, the mobile phone is more likely to scan the smart TV. In this way, the smart TV can interact with the AP on channel 3 and can also be in a discoverable state, which not only reduces frequent channel switching, but also improves the Internet experience of the smart TV.

[0143] like Fig. 9 As shown in the figure, after the smart TV starts to discover, it can monitor 10ms on channel 1 of the 2.4GHz band, monitor 90ms on the working channel, and then continue to monitor 10ms on channel 1 and 90ms on the working channel, and monitor in sequence. In this way, the smart TV can be in a monitoring state for a period of time, so that the smart TV can be discovered, and can also be in a communication state with the AP for most of the time, so that the network connected to the smart TV will not be disconnected, reducing the interface freeze of the smart TV.

[0144] Optional, such as Fig.10 As shown, in one cycle, the smart TV may also first monitor on the working channel, and then monitor on channel 1 of the 2.4 GHz frequency band, which is not limited in the embodiment of the present application. 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 monitor on channel 1 for 10 ms, and so on.

[0145] It is understandable that it is necessary for the smart TV to monitor the social channel for a period of time. At this time, if the smart TV STA is connected to the AP of the 5GHz frequency band and only monitors on the working channel, the mobile phone that only supports the 2.4G frequency band will not be able to discover the smart TV. In addition, if the mobile phone does not find the smart TV during the scanning phase, the mobile phone will scan on the social channel. If the smart TV only monitors on the working channel, the mobile phone will not be able to find the smart TV. Therefore, the smart TV can increase the probability of being discovered by monitoring the social channel for a period of time.

[0146] It is understandable that the listening time of the smart TV on the social channel and the listening time on the working channel can be pre-set by the smart TV. Among them, the listening time on the social channel and the listening time on the working channel can be equal or different, which is not limited in the embodiment of the present application.

[0147] Through experimental tests, it is known that in the above situation 3, when the smart TV STA is connected to the AP in the 5GHz frequency band, the smart TV monitors the STA working channel for 90ms and the social channel for 10ms. It is likely that the mobile phone will take about 10s to discover the smart TV, and the mobile phone will take about 3s to connect to the smart TV when it is not the first screen projection.

[0148] Tables 1, 2, and 3 below show the duration of the mobile phone discovering the smart TV and the duration of the mobile phone connecting to the smart TV when the ratio of the monitoring duration of the social channel to the monitoring duration of the STA working channel is different. Among them, a dual-band mobile phone can be understood as a mobile phone that supports both 5G and 2.4G, and a 2.4G only mobile phone can be understood as a mobile phone that only supports 2.4G.

[0149] Table 1:

[0150]

[0151] Table 2:

[0152]

[0153] Table 3:

[0154]

[0155] In addition, experimental tests also show that when the smart TV STA is connected to the AP in the 5GHz frequency band, the device screen casting discovery process will affect the rate of interaction between the smart TV STA and the AP. As shown in Table 4 below, when the smart TV STA is always connected to the AP, the interaction rate is about 296Mbps. When the ratio of the smart TV's monitoring time in the social channel to the STA's working channel monitoring time is 50:450, the interaction rate drops to about 237Mbps.

[0156] Table 4:

[0157] Monitor the 5G band for 500ms periodically The monitoring period is 450ms in the 5G band and 50ms in channel 1. rate 296Mbps 237Mbps

[0158] From the above experimental data, it can be known 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 find or cannot find the smart TV. In order to prevent the network connected to the smart TV from being disconnected, the smart TV can set the listening time on the working channel to be longer than the listening time on the social channel, so that the smart TV can be discovered without affecting the user's viewing of the smart TV.

[0159] In addition, when determining the listening time on the social channel and the listening time on the working channel, the influence of other factors such as the channel switching time, the scanning time of a single channel, and the delay requirement of the service may also be considered.

[0160] For example, if the channel switching time is about 140ms, it is not appropriate for the smart TV to monitor 10ms on channel 1 and 90ms on the working channel. Because in this case, in a monitoring cycle, 10ms is used for monitoring and being discovered, 140ms is used for switching channels, and 90ms is used for connecting to the network. In other words, 140ms out of 240ms cannot be used for being discovered or transmitting data. Therefore, if the channel switching time is long, the smart TV's monitoring time on channel 1 and the monitoring time on the working channel should be set relatively long.

[0161] In addition, if the scanning time of a single channel is about 40ms, since it is expected that the mobile phone can find the smart TV during the channel scanning, the monitoring time of the smart TV on the monitoring channel can be greater than 40ms. In this way, the probability of the smart TV being discovered by the mobile phone is relatively high.

[0162] In summary, the ratio of the social channel monitoring time to the STA working channel monitoring time needs to be compromised, so as to reduce the time for discovering and connecting to smart TVs and make the Internet speed drop less obvious, thereby improving both the screen projection experience and the user's Internet experience.

[0163] In view of the above-mentioned disadvantage that the Internet access speed is affected when the smart TV is connected to an AP in the 5 GHz frequency band, the embodiments of the present application can select different monitoring methods according to the chip specifications of the smart TV.

[0164] Monitoring method 1: If the smart TV supports DBDC, 2.4G and 5G can work concurrently using one antenna each.

[0165] That is to say, if the smart TV supports DBDC, when the smart TV performs Wi-Fi P2P loop monitoring, the smart TV can keep one antenna working at the site and switch the other antenna to the social channel for loop monitoring. In this way, when the smart TV is in the Wi-Fi P2P monitoring state, the network rate of the smart TV STA will not drop to zero.

[0166] In one possible scenario, when the smart TV performs cyclic monitoring based on the Wi-Fi P2P protocol, in each cycle, the smart TV can 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 the STA working channel monitoring is completed, the smart TV STA can notify the AP through Wi-Fi management frames and other methods that the current smart TV needs to switch from dual-antenna operation to single-antenna operation, and then the smart TV can use 1 antenna to perform Wi-Fi P2P cyclic monitoring on the social channel. Among them, the embodiment of the present application does not limit the specific implementation method of the Wi-Fi management frame.

[0167] 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 current smart TV needs to switch from a single antenna to dual antennas. It can be understood that the smart TV notifies the AP through Wi-Fi management frames, etc., so that after the smart TV switches the antenna, the data transmission and reception between the smart TV and the AP will not be affected.

[0168] In another possible scenario, due to limitations such as user bandwidth and chip communication interface, although the smart TV supports 2*2MIMO, in fact, the maximum Internet access rate can be achieved using only one antenna SISO. For example, the theoretical rate of 2*2MIMO is 866Mbps, and the theoretical rate of 1*1SISO is 433Mbps. Although a smart TV supports 2*2MIMO, the actual test rate is up to 296Mbps. In other words, it is enough for the smart TV to use only one antenna SISO. At this time, the other antenna can be used for Wi-Fi P2P loop monitoring. In this way, the user's Internet experience can be satisfied, and the quick discovery of screen projection can be achieved.

[0169] Monitoring method 2: If the smart TV supports DBS, 2.4G and 5G can work using two antennas each.

[0170] That is to say, the smart TV STA can use two antennas to communicate with the AP in MIMO mode, and can also use these two antennas to perform Wi-Fi P2P loop monitoring. In this way, the smart TV can communicate with the AP and keep loop monitoring on the social channel, so that the Internet access rate of the smart TV STA is not reduced, and the discovery of the screen projection is accelerated.

[0171] 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.

[0172] Improvement 1: In the wireless Miracast screen projection scenario, since the mobile phone only needs to discover the smart TV but does not need to be discovered by the smart TV, the mobile phone does not need to switch to the monitoring state, and only needs to keep the scanning state and search state to discover the smart TV. This can reduce the screen projection time and improve the user experience.

[0173] Improvement 2: In some wireless Miracast screen projection scenarios, the distance between the mobile phone and the smart TV is relatively close, and the mobile phone and the smart TV are more likely to connect to the same AP, that is, the mobile phone STA and the smart TV STA are more likely to be on the same channel. Therefore, the monitoring state in the Wi-Fi P2P protocol can be replaced with a scanning state that scans the working channel of the mobile phone STA. In this way, the probability of the mobile phone discovering the smart TV during screen projection can be increased, and the discovery time of the screen projection can be reduced.

[0174] like Fig.11 As shown in the figure, taking the mobile phone connected to the AP of channel 149 in the 5GHz band as an example, the mobile phone can scan all channels after starting to discover. For example, it takes about 3.4 seconds for the mobile phone to scan 26 channels. After completing the full channel scan, the mobile phone can scan on the working channel of the mobile STA. For example, the mobile phone can scan on channel 149 for 307ms, and the mobile phone can also delay on the working channel for about 50ms, so that the network between the mobile phone and the AP will not be disconnected. After the working channel delays for 50ms, the mobile phone can switch to the search state. For example, the mobile phone can search on the social channel for 626ms.

[0175] Afterwards, the mobile phone can also switch back to the working channel of the mobile phone STA and execute the above process repeatedly. Among them, different electronic devices may have different delay durations in the working channel, and the embodiment of the present application does not limit the specific delay duration of the electronic device in the working channel.

[0176] Improvement 3: In the Wi-Fi P2P protocol, when the mobile phone is in the search state, it can search not only the social channels but also the working channels of the mobile phone STA. In other words, 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 channels of the mobile phone STA. In this way, the probability of the mobile phone discovering the smart TV during screen casting can be increased, and the casting discovery time can be reduced.

[0177] like Fig.12 As shown in the figure, taking the mobile phone connected to the AP of channel 149 of the 5GHz band as an example, the mobile phone can scan all channels after starting discovery. After completing the full channel scan, the mobile phone can switch to the working channel so that the network between the mobile phone and the AP will not be disconnected. After a delay of 50ms on the working channel, the mobile phone can switch to the search state. For example, the mobile phone can search for 626ms on the social channel and the working channel of the mobile STA.

[0178] Afterwards, the mobile phone can also switch back to the working channel of the mobile phone STA and execute the above process repeatedly. Among them, different electronic devices may have different delay durations in the working channel, and the embodiment of the present application does not limit the specific delay duration of the electronic device in the working channel.

[0179] In a possible implementation, whether to execute the device discovery method of the embodiment of the present application is determined by acquiring air interface information of a channel of the electronic device.

[0180] 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 performed, the air interface information can be queried to find the probe request sent on channel 1 when the smart TV is in a scanning state, and / or the probe request sent on channel 1 when the smart TV is in a searching state. In addition, the probe response (probe response) replied by the other device may also be queried.

[0181] If the device discovery method of the embodiment of the present application is executed, the air interface information cannot be queried for the detection request sent on channel 1 when the smart TV is in the scanning state, and / or the detection request sent on channel 1 when the smart TV is in the searching state. In addition, the detection response replied by the other device cannot be queried.

[0182] The following specific embodiments are used to describe the method of the present application in detail. The following embodiments may be combined with each other or implemented independently, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0183] Fig.13 The device discovery method of the embodiment of the present application is shown. The method includes:

[0184] S1301: In a first time period, a first electronic device performs channel monitoring, and a second electronic device performs channel scanning.

[0185] In the embodiment of the present application, the first electronic device can be understood as the screen projection display end in the wireless screen projection scenario, for example, the first electronic device can be understood as the smart TV in the above embodiment. The second electronic device can be understood as the screen projection source end in the wireless screen projection scenario, for example, the second electronic device can be understood as the mobile phone in the above embodiment.

[0186] The first time period can be understood as the time period during which the second electronic device performs channel scanning, or can be understood as the duration during which the second electronic device performs channel scanning. It is understandable that the duration during which the first electronic device performs channel monitoring and the duration during which the second electronic device performs channel scanning can be the same or different.

[0187] Channel monitoring can be understood as the above Figure 5 In the corresponding embodiment, the electronic device monitors the channel when it is in the listening state. Channel scanning can be understood as the above Figure 5 In the corresponding embodiment, the electronic device monitors the channel when it is in a scanning state.

[0188] S1302: In a second time period, the first electronic device performs channel monitoring, and the second electronic device performs channel monitoring.

[0189] 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 understandable that the duration during which the first electronic device performs channel monitoring and the duration during which the second electronic device performs channel monitoring can be the same or different.

[0190] S1303: In a third time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching.

[0191] 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 can be understood that the duration during which the first electronic device performs the channel monitoring and the duration during which the second electronic device performs the channel search can be the same or different.

[0192] Channel search can be understood as the above Figure 5 In the corresponding embodiment, the electronic device monitors the channel when it is in a search state.

[0193] 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 searching 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.

[0194] S1304: In a fourth time period, the first electronic device performs channel monitoring, and the second electronic device performs channel monitoring.

[0195] 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 can be understood that the duration of the fourth time period can be the same as or different from the duration of the second time period.

[0196] 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.

[0197] In the embodiment of the present application, the fifth time period can be understood as the time period for the second electronic device to perform a channel search, and can also be understood as the duration for the second electronic device to perform a channel search. It is understandable that the duration of the fifth time period and the duration of the third time period can be the same or different. 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 in a listening state. In this way, the first electronic device can be in a listening state for a longer period of time, which increases the probability of the first electronic device being discovered, reduces the time for screen projection discovery, and thus improves the screen projection experience.

[0198] Optional, in Fig.13 On the basis of the corresponding embodiment, when the first electronic device performs channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device performs monitoring on the first channel, wherein the first channel belongs to a social channel.

[0199] 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.

[0200] In 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 the above embodiment 1 and the above embodiment 2. Figure 8 The relevant descriptions in the corresponding embodiments are not repeated here. The first electronic device keeps monitoring in a loop on the first channel, which can increase the probability of being discovered and shorten the screen projection time.

[0201] Optional, in Fig.13 On the basis of the corresponding embodiment, when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the second channel, the first electronic device performs monitoring on the second channel, wherein the second channel belongs to a social channel.

[0202] 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.

[0203] In 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 described in detail.

[0204] 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.

[0205] Optional, in Fig.13 On the basis of the corresponding embodiment, when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the third channel, the first electronic device performs monitoring on the third channel, wherein the third channel belongs to a non-social channel in the 2.4 GHz frequency band.

[0206] In an 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.

[0207] If the first electronic device is connected to an AP of a 2.4G non-social channel, it means that the social channel and the working channel of the first electronic device are not on the same channel. The first electronic device performs cyclic monitoring on the third channel, and the first electronic device can be scanned with a high probability. In this way, the first electronic device can interact with the AP on the third channel and can also be in a discovered state, which reduces frequent channel switching and improves the Internet experience of the first electronic device.

[0208] Optional, in Fig.13 On the basis of the corresponding embodiment, when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the fourth channel, the first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, wherein the fourth channel belongs to a non-social channel and the fifth channel belongs to a social channel.

[0209] 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.

[0210] 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 most of the time so that the network connected to the first electronic device will not be disconnected, reducing interface freezes of the first electronic device.

[0211] Optional, in Fig.13 On the basis of the corresponding embodiments, 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 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.

[0212] In the embodiment of the present application, in the scenario where the first electronic device supports the dual-band dual-transmit DBDC working mode, the switching of the first electronic device between dual-antenna working and single-antenna working can refer to the relevant description of monitoring mode 1 in the above embodiment, and no further description is given. The switching of the first electronic device between dual-antenna working and single-antenna working can ensure that the network rate of the first electronic device does not drop to zero when the first electronic device is in the monitoring state of Wi-Fi P2P.

[0213] Optional, in Fig.13 On the basis of the corresponding embodiments, 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.

[0214] In the embodiment of the present application, in the scenario where the first electronic device supports the dual-band dual-transmit DBDC working mode, the first electronic device notifies the AP through the Wi-Fi management frame. The relevant description of the monitoring method 1 in the above embodiment can be referred to and will not be repeated here.

[0215] Understandably, Fig.13 The AP in the corresponding embodiment 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.

[0216] The first electronic device notifies the AP through a Wi-Fi management frame or the like, so that after the first electronic device switches the antenna, data transmission and reception between the first electronic device and the AP will not be affected.

[0217] Optional, in Fig.13 On the basis of the corresponding embodiments, 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.

[0218] In the embodiment of the present application, in the scenario where the first electronic device supports the dual-band dual-transmit DBDC working mode, the first electronic device can perform cyclic monitoring on the fourth channel and the fifth channel, which can refer to the relevant description of the monitoring method 1 in the above embodiment and will not be repeated. The first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, which can not only meet the user's Internet experience, but also realize the rapid discovery of screen projection.

[0219] Optional, in Fig.13 On the basis of the corresponding embodiment, 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 the two antennas to perform monitoring on the sixth channel, wherein the sixth channel belongs to the channel of the 5GHz frequency band.

[0220] 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 by referring to the relevant description of the monitoring method 2 in the above embodiment, which will not be repeated. The first electronic device can communicate with the AP and can also perform cyclic monitoring on the social channel, so that the Internet access rate of the first electronic device is not reduced, and the discovery of the screen projection is accelerated.

[0221] Optional, in Fig.13 On the basis of the corresponding embodiment, before the first time period, it may also include: the second electronic device receives an operation for screen projection.

[0222] In the embodiment of the present application, the operation for screen projection may include the operation of the user clicking the screen projection button, the screen projection triggering operation of the user's voice input, etc., which is not limited in the embodiment of the present application. Figure 3 The wireless screen projection switch 301 in the corresponding embodiment.

[0223] The second electronic device performs channel scanning after receiving the operation for screen projection, so that the second electronic device can start channel scanning when the user wants to project the screen, thereby reducing the execution of unnecessary device discovery processes.

[0224] Fig.14 The device discovery method of the embodiment of the present application is shown. The method includes:

[0225] S1401: In a first time period, a first electronic device performs channel monitoring, and a second electronic device performs channel scanning.

[0226] In the embodiment of the present application, the first electronic device and the second electronic device can refer to the above Fig.13 The relevant description in step S1301 of the corresponding embodiment is not repeated here.

[0227] The first time period can be understood as the time period during which the second electronic device performs channel scanning, or can be understood as the duration during which the second electronic device performs channel scanning. It is understandable that the duration during which the first electronic device performs channel monitoring and the duration during which the second electronic device performs channel scanning can be the same or different.

[0228] Channel monitoring and channel scanning can refer to the above Fig.13 The relevant description in step S1301 of the corresponding embodiment is not repeated here.

[0229] S1402: In a second time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching.

[0230] 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 understandable that the duration during which the first electronic device performs the channel monitoring and the duration during which the second electronic device performs the channel search can be the same or different.

[0231] Channel search can refer to the above Fig.13 The relevant description in step S1301 of the corresponding embodiment is not repeated here.

[0232] 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.

[0233] 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 during which the second electronic device performs a task on the working channel of the second electronic device. It can be understood that the duration during which the first electronic device performs channel monitoring and the duration during which the second electronic device performs a task on the working channel of the second electronic device can be the same or different.

[0234] S1404: In a fourth time period, the first electronic device performs channel monitoring, and the second electronic device performs channel searching.

[0235] 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 can be understood that the duration of the fourth time period can be the same as or different from the duration of the second time period.

[0236] S1405: In a fifth time period, the first electronic device performs channel monitoring, and the second electronic device performs a task on a working channel of the second electronic device.

[0237] 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 the task on the working channel of the second electronic device, and can also be understood as the duration of the second electronic device performing the task on the working channel of the second electronic device. It can be understood that the duration of the fifth time period can be the same as or different from the duration of the third time period.

[0238] 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.

[0239] 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 can be understood that the duration of the sixth time period can be the same as or different from the duration of the fourth time period.

[0240] It is understandable that in Fig.14 In the corresponding embodiment, the execution steps corresponding to the third time period and the fifth time period may not be executed. That is, the second time period may be continuous with the fourth time period, and the fourth time period may be continuous with the sixth time period.

[0241] 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. The second electronic device does not need to switch to the listening state. It only needs to keep the scanning state and the searching state to discover the first electronic device. In this way, the screen projection time can be reduced and the user experience can be improved.

[0242] Optional, in Fig.14 Based on the corresponding embodiments, 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.

[0243] In the embodiment 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, which can refer to the relevant description in Improvement 2 corresponding to the above embodiment, and the above Fig.11 The relevant descriptions in the corresponding embodiments are not repeated here.

[0244] 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.

[0245] Optional, in Fig.14 Based on the corresponding embodiment, the second electronic device performs a channel search on the social channel and the working channel of the second electronic device.

[0246] 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, which can refer to the relevant description in Improvement 3 corresponding to the above embodiment, and the above Fig.12 The relevant descriptions in the corresponding embodiments are not repeated here.

[0247] When the second electronic device performs channel scanning in the search state, in addition to searching the social channel, it can also search the working channel of the second electronic device. In this way, the probability of the second electronic device finding the first electronic device when casting the screen can be increased, and the casting discovery time can be reduced.

[0248] Optional, in Fig.14 On the basis of the corresponding embodiment, when the first electronic device performs channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device performs monitoring on the first channel, wherein the first channel belongs to a social channel.

[0249] In the embodiment of the present application, in the device discovery process, if the first electronic device is not connected to the wireless access point AP, reference can be made to the relevant description of the situation 1 in the above embodiment, as well as the above Figure 8 The relevant descriptions in the corresponding embodiments are not repeated here. The first electronic device keeps monitoring in a loop on the first channel, which can increase the probability of being discovered and shorten the screen projection time.

[0250] Optional, in Fig.14 On the basis of the corresponding embodiment, when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the second channel, the first electronic device performs monitoring on the second channel, wherein the second channel belongs to a social channel.

[0251] 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.

[0252] 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.

[0253] Optional, in Fig.14 On the basis of the corresponding embodiment, when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the third channel, the first electronic device performs monitoring on the third channel, wherein the third channel belongs to a non-social channel in the 2.4 GHz frequency band.

[0254] In an embodiment of the present application, if the first electronic device is connected to an AP of a 2.4G non-social channel, it means that the social channel and the working channel of the first electronic device are not on the same channel. The first electronic device performs cyclic monitoring on the third channel, and the first electronic device can be scanned with a high probability. In this way, the first electronic device can interact with the AP on the third channel and can also be in a discovered state, which reduces frequent channel switching and improves the Internet experience of the first electronic device.

[0255] Optional, in Fig.14 On the basis of the corresponding embodiment, when the first electronic device performs channel monitoring, if the first electronic device is connected to the AP of the fourth channel, the first electronic device performs cyclic monitoring on the fourth channel and the fifth channel, wherein the fourth channel belongs to a non-social channel and the fifth channel belongs to a social channel.

[0256] 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.

[0257] 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 most of the time so that the network connected to the first electronic device will not be disconnected, reducing interface freezes of the first electronic device.

[0258] Optional, in Fig.14 On the basis of the corresponding embodiment, before the first time period, it may also include: the second electronic device receives an operation for screen projection.

[0259] In the embodiment of the present application, the operation for screen projection may include the operation of the user clicking the screen projection button, the screen projection triggering operation of the user's voice input, etc., which is not limited in the embodiment of the present application. Figure 3 The wireless screen projection switch 301 in the corresponding embodiment. The second electronic device performs channel scanning after receiving the operation for screen projection, so that the second electronic device can start channel scanning when the user wants to project the screen, thereby reducing the execution of unnecessary device discovery processes.

[0260] It should be noted that Fig.13 The first time period and Fig.14 The first time period in the corresponding embodiment can be different time periods. Fig.13 The second time period and Fig.14 The second time period in the corresponding embodiment may be a different time period. Fig.13 The third time period and Fig.14 The third time period in the corresponding embodiment may be a different time period. Fig.13 The fourth time period and Fig.14 The fourth time period in the corresponding embodiment may be a different time period. Fig.13 The fifth time period and Fig.14 The fifth time period in the corresponding embodiment may be a different time period. That is to say, the concepts of the first time period, the second time period, the third time period, the fourth time period, and the fifth time period are only understood in the respective embodiments.

[0261] also, Fig.13 The first channel and Fig.14 The first channel in the corresponding embodiment may be a different channel. Fig.13 The second channel and Fig.14 The second channel in the corresponding embodiment may be a different channel. Fig.13 The third channel and Fig.14 The third channel in the corresponding embodiment may be a different channel. Fig.13 The fourth channel and Fig.14 The fourth channel in the corresponding embodiment may be a different channel. Fig.13 The fifth channel and Fig.14 The fifth channel in the corresponding embodiment may be a different channel. That is to say, the concepts of the first channel, the second channel, the third channel, the fourth channel, and the fifth channel are only understood in the respective embodiments.

[0262] Fig.15 The device discovery method of the embodiment of the present application is shown. The method includes:

[0263] S1501: The first electronic device continues to perform channel monitoring.

[0264] In the embodiment of the present application, the first electronic device can refer to the above Fig.13 The relevant description in step S1301 of the corresponding embodiment is not repeated here.

[0265] Channel monitoring can refer to the above Fig.13 The relevant description in step S1301 of the corresponding embodiment is not repeated here.

[0266] S1502: When the second electronic device performs device discovery, the second electronic device cyclically performs channel monitoring and channel searching after performing channel scanning, or the second electronic device continuously performs channel searching after performing channel scanning.

[0267] In the embodiment of the present application, the second electronic device can refer to the above Fig.13 The relevant description of step S1301 in the corresponding embodiment is not repeated here. Channel scanning and channel searching can refer to the above Fig.13 The relevant description in step S1301 of the corresponding embodiment is not repeated here.

[0268] 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 keep the scanning state and the searching state to discover the first electronic device. In this way, the screen projection time can be reduced and the user experience can be improved.

[0269] Optional, in Fig.15 On the basis of the corresponding embodiment, when the first electronic device continuously performs channel monitoring, if the first electronic device is not connected to the wireless access point AP, the first electronic device continuously performs channel monitoring on the first channel, wherein the first channel belongs to a social channel.

[0270] In the embodiment of the present application, in the device discovery process, if the first electronic device is not connected to the wireless access point AP, reference can be made to the relevant description of the situation 1 in the above embodiment, as well as the above Figure 8 The relevant descriptions in the corresponding embodiments are not repeated here. The first electronic device keeps monitoring in a loop on the first channel, which can increase the probability of being discovered and shorten the screen projection time.

[0271] Optional, in Fig.15 On the basis of the corresponding embodiment, when the first electronic device continuously performs channel monitoring, if the first electronic device is connected to the AP of the second channel, the first electronic device continuously performs channel monitoring on the second channel, wherein the second channel belongs to a social channel.

[0272] 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.

[0273] 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.

[0274] Optional, in Fig.15 On the basis of the corresponding embodiment, when the first electronic device continuously performs channel monitoring, if the first electronic device is connected to the AP of the 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 the 2.4 GHz frequency band.

[0275] In an embodiment of the present application, if the first electronic device is connected to an AP of a 2.4G non-social channel, it means that the social channel and the working channel of the first electronic device are not on the same channel. The first electronic device performs cyclic monitoring on the third channel, and the first electronic device can be scanned with a high probability. In this way, the first electronic device can interact with the AP on the third channel and can also be in a discovered state, which reduces frequent channel switching and improves the Internet experience of the first electronic device.

[0276] Optional, in Fig.15 On the basis of the corresponding embodiment, 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 a non-social channel and the fifth channel belongs to a social channel.

[0277] 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.

[0278] 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 most of the time so that the network connected to the first electronic device will not be disconnected, reducing interface freezes of the first electronic device.

[0279] It should be noted that Fig.14 The first channel and Fig.15 The first channel in the corresponding embodiment may be a different channel. Fig.14 The second channel and Fig.15 The second channel in the corresponding embodiment may be a different channel. Fig.14 The third channel and Fig.15 The third channel in the corresponding embodiment may be a different channel. Fig.14 The fourth channel and Fig.15 The fourth channel in the corresponding embodiment may be a different channel. Fig.14 The fifth channel and Fig.15 The fifth channel in the corresponding embodiment may be a different channel. That is to say, the concepts of the first channel, the second channel, the third channel, the fourth channel, and the fifth channel are only understood in the respective embodiments.

[0280] 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 the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0281] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve 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 the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0282] 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. There may be other division methods in actual implementation.

[0283] like Fig.16 FIG. 16 is a schematic diagram of a chip structure provided by 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 .

[0284] In some implementations, the memory 1604 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0285] The method described in the above embodiment of the present application can be applied to the processor 1601, or implemented by the processor 1601. The processor 1601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 1601. The above processor 1601 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 1601 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.

[0286] The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as a random access memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1604, and the processor 1601 reads the information in the memory 1604 and completes the steps of the above method in combination with its hardware.

[0287] The processor 1601 , the memory 1604 , and the communication interface 1603 may communicate with each other via the communication line 1602 .

[0288] In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory, or may be downloaded and installed in the memory in the form of software.

[0289] The embodiment of 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 site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode. 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 a magnetic medium (e.g., a floppy disk, a hard disk or a tape), an optical medium (e.g., a digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0290] 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 by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.

[0291] As a possible design, the computer readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection 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 technology (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology 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 usually reproduce data magnetically, while optical discs reproduce data optically using lasers.

[0292] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

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 one antenna to communicate with the AP on the fourth channel and uses another antenna 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.