Screen projection method, screen projection system and first electronic device
By integrating sensors and cameras on the first electronic device, and utilizing proximity light sensors, ambient light sensors, and image RGB dot matrix information, it automatically detects and connects to the second electronic device with the strongest signal for screen projection, solving the problem of lengthy screen projection operations and improving user experience and accuracy.
Patent Information
- Application Number
- CN202110943131.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-17
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2041-08-17
AI Technical Summary
The existing screen projection operation process is relatively lengthy and the user experience is poor.
By integrating sensors and cameras on the first electronic device, and utilizing proximity light sensors, ambient light sensors, and image RGB dot matrix information, it automatically detects and connects to the second electronic device with the strongest signal for screen projection, simplifying the operation process.
It realizes the automation and accuracy of screen projection operations, improves user experience and reduces erroneous operations.
Smart Images

Figure CN115706822B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a screen projection method, a screen projection system and a first electronic device. Background Art
[0002] With the development of internet technology, screen mirroring has become widely used. Screen mirroring refers to transferring files (such as videos, pictures, music, documents, etc.) from one device to another. For example, you can cast a video from your phone to a smart TV for playback, allowing users to view the video on their smart TV. However, the current screen mirroring process is lengthy and provides a poor user experience. Summary of the Invention
[0003] In order to achieve the above-mentioned technical objectives, the present application provides a screen projection method, system, first electronic device, computer-readable storage medium and computer program product, which can simplify the screen projection process and enhance the user's screen projection experience.
[0004] In a first aspect, a first electronic device is provided. The first electronic device may include: a memory storing one or more computer programs; a processor coupled to the memory, and configured to, when the one or more computer programs are executed by the processor, cause the first electronic device to execute: after the first electronic device detects that the distance between the first electronic device and the obstruction is less than or equal to a preset first distance, and the intensity, flickering frequency, and image RGB dot matrix information of the ambient light detected by the first electronic device meet the preset first requirement, second requirement, and third requirement, automatically scanning through a first short-range wireless communication method, automatically selecting the electronic device with the strongest scanned first short-range wireless communication signal strength as the second electronic device to receive the screen projection; automatically sending a screen projection request to the second electronic device, establishing a screen projection connection, and transmitting the screen projection data; wherein the distance between the first electronic device and the obstruction, the intensity, flickering frequency, and image RGB dot matrix information of the ambient light are all detected by at least one sensor on the side of the first electronic device close to the obstruction. In this way, after the first electronic device reaches the preset requirements based on the detected distance between the first electronic device and the obstruction, the intensity of the ambient light, the flashing frequency, and the image RGB dot matrix information, it automatically scans through the first short-range wireless communication method, and uses the electronic device with the strongest signal strength as the second electronic device to receive the screen projection; it automatically establishes a screen projection connection to the second electronic device and transmits the screen projection data. The entire process only requires the user to bring the first electronic device close to the second electronic device in the bright screen state, without the need for additional operations. The screen projection operation is automated, the screen projection operation is simplified, and the user experience is improved.
[0005] According to the first aspect, after the intensity, flicker frequency and image RGB dot matrix information of the ambient light detected by the first electronic device meet the preset first requirement, second requirement and third requirement respectively, the first electronic device further performs: obtaining at least one frame of the first image through at least one camera on the side of the first electronic device close to the obstruction; calculating a first confidence level based on at least one frame of the first image and a preset algorithm; the first confidence level is used to measure the probability that the obstruction approached by the first electronic device is the second electronic device and that the second electronic device includes a display screen; after the first confidence level is greater than the preset confidence level threshold, automatically scanning through the first short-range wireless communication method. In this way, by judging whether the obstruction has a display screen based on the confidence level of the image captured by the camera on the first electronic device, it is determined whether the obstruction has the ability to project a screen, thereby improving the accuracy of the screen projection operation and avoiding erroneous screen projection operations.
[0006] According to the first aspect, or any implementation of the first aspect above, after acquiring at least one frame of the first image, the first electronic device further performs: after recognizing that at least one frame of the first image includes at least one of an RGB dot matrix image and a texture graphic, calculating a first confidence level based on at least one frame of the first image and a preset algorithm. The first confidence level is used to measure the probability that the obstruction approached by the first electronic device is a second electronic device, and that the second electronic device includes a display screen; after the first confidence level is greater than a preset confidence level threshold, the device automatically scans through a first short-range wireless communication method. In this way, by judging whether the obstruction has a display screen based on the confidence level of the image captured by the camera on the first electronic device, it is determined whether the obstruction has the ability to project a screen, thereby improving the accuracy of the screen projection operation and avoiding erroneous screen projection operations.
[0007] According to the first aspect, or any implementation of the first aspect above, after automatically selecting the electronic device with the strongest scanned first short-range wireless communication signal strength as the second electronic device to receive the screen projection, the first electronic device further performs: obtaining a relative position relationship between the first electronic device and the second electronic device; wherein the screen projection request includes the relative position relationship. In this way, the relative position can facilitate the second electronic device to display the projection data in the corresponding area, thereby improving the user experience.
[0008] According to the first aspect, or any implementation of the first aspect above, the first electronic device includes at least one of the following: a smart phone, a tablet computer, and a laptop computer; the second electronic device includes at least one of the following: a smart TV and a desktop computer.
[0009] According to the first aspect, or any implementation of the first aspect above, the first electronic device is in a screen-on state before execution.
[0010] In a second aspect, a screen projection method is provided, applied to a first electronic device. The method comprises: after the first electronic device detects that the distance between the first electronic device and an obstruction is less than or equal to a preset first distance, and the ambient light intensity, flicker frequency, and image RGB dot matrix information detected by the first electronic device meet preset first, second, and third requirements, automatically scanning via a first short-range wireless communication method, automatically selecting the electronic device with the strongest first short-range wireless communication signal strength as the second electronic device to receive the screen projection; automatically sending a screen projection request to the second electronic device, establishing a screen projection connection, and transmitting screen projection data; wherein the distance between the first electronic device and the obstruction, the ambient light intensity, flicker frequency, and image RGB dot matrix information are all detected by at least one sensor on the side of the first electronic device closest to the obstruction. In this way, after the first electronic device detects that the distance between the first electronic device and the obstruction, the ambient light intensity, flicker frequency, and image RGB dot matrix information meet the preset requirements, automatically scanning via the first short-range wireless communication method, selecting the electronic device with the strongest signal strength as the second electronic device to receive the screen projection; automatically establishing a screen projection connection with the second electronic device, and transmitting screen projection data. The entire process only requires the user to bring the first electronic device close to the second electronic device in the bright screen state, without any additional operation. This realizes the automation of the screen projection operation, simplifies the screen projection operation, and improves the user experience.
[0011] According to the second aspect, after the intensity, flicker frequency and image RGB dot matrix information of the ambient light detected by the first electronic device meet the preset first requirement, second requirement and third requirement respectively, the method further includes: obtaining at least one frame of the first image through at least one camera on the side of the first electronic device close to the obstruction; calculating a first confidence level based on at least one frame of the first image and a preset algorithm; the first confidence level is used to measure the probability that the obstruction approached by the first electronic device is the second electronic device and that the second electronic device includes a display screen; after the first confidence level is greater than the preset confidence level threshold, automatically scanning through the first short-range wireless communication method. In this way, by judging whether the obstruction has a display screen based on the confidence level of the image captured by the camera on the first electronic device, it is determined whether the obstruction has the ability to project a screen, thereby improving the accuracy of the screen projection operation and avoiding erroneous screen projection operations.
[0012] According to the second aspect, after acquiring at least one frame of the first image, the method further includes: after recognizing that at least one frame of the first image includes at least one of an RGB dot matrix image and a texture graphic, calculating a first confidence level based on the at least one frame of the first image and a preset algorithm. The first confidence level is used to measure the probability that the obstruction approached by the first electronic device is the second electronic device, and that the second electronic device includes a display screen; after the first confidence level is greater than a preset confidence level threshold, the first short-range wireless communication method is automatically scanned. In this way, by judging whether the obstruction has a display screen based on the confidence level of the image captured by the camera on the first electronic device, it is determined whether the obstruction has the ability to project a screen, thereby improving the accuracy of the screen projection operation and avoiding erroneous screen projection operations.
[0013] According to a second aspect, after automatically selecting the electronic device with the strongest first short-range wireless communication signal strength as the second electronic device to which the screen projection is to be transmitted, the method further includes: obtaining a relative positional relationship between the first electronic device and the second electronic device; wherein the screen projection request includes the relative positional relationship. In this way, the relative position can facilitate the second electronic device to display the projection data in the corresponding area, thereby improving the user experience.
[0014] According to the second aspect, or any implementation of the second aspect above, the first electronic device includes at least one of the following: a smart phone, a tablet computer, and a laptop computer; the second electronic device includes at least one of the following: a smart TV and a desktop computer.
[0015] According to the second aspect, or any implementation of the second aspect above, in the method, the first electronic device is always in a screen-on state; or, before the method is executed, the first electronic device is in a screen-on state.
[0016] In a third aspect, a screen projection system is provided. The screen projection system includes: a first electronic device and a second electronic device; the first electronic device includes a first display screen; the second electronic device includes a second display screen, the second display screen being in a bright screen state. The first electronic device includes: a first memory storing one or more computer programs; and a first processor coupled to the first memory and configured to, when the one or more computer programs are executed by the first processor, cause the first electronic device to execute: upon the first electronic device detecting that the distance between the first electronic device and an obstruction is less than or equal to a preset first distance, and the intensity, flicker frequency, and image RGB dot matrix information detected by the first electronic device meet preset first, second, and third requirements, automatically scanning via a first short-range wireless communication method, automatically selecting the electronic device with the strongest first short-range wireless communication signal strength as the second electronic device to receive the screen projection; and automatically sending a screen projection request to the second electronic device, establishing a screen projection connection, and transmitting the screen projection data; wherein the distance between the first electronic device and the obstruction, the intensity, flicker frequency, and image RGB dot matrix information are all detected by at least one sensor on the side of the first electronic device closest to the obstruction. The second electronic device includes: a second memory storing one or more computer programs; a second processor coupled to the second memory, and configured to, when the one or more computer programs are executed by the second processor, enable the second electronic device to execute: receiving a screen projection request and establishing a screen projection connection; receiving screen projection data and displaying the screen projection data. In this way, when the first electronic device detects that the distance between it and the obstruction is less than or equal to the first distance, it can determine that the obstruction meets the preset requirements based on the relevant parameters of the ambient light, and can automatically filter out a second electronic device that can accept the screen projection from the environment, and send the screen projection data to the second electronic device. After that, the second electronic device can receive the screen projection data and display the screen projection data, thereby realizing the automatic completion of the screen projection operation, simplifying the screen projection process, and improving the user's screen projection experience.
[0017] According to the third aspect, the second electronic device further performs: after establishing a screen projection connection, displaying a first color in a first area of the second display screen and a second color in a second area of the second display screen; receiving a first message from the first electronic device, the first message being used to indicate the first color or the second color; if the first message indicates the first color, displaying the projection data in the first area; if the first message indicates the second color, displaying the projection data in the second area; the first electronic device further performs: obtaining at least one frame of a second image through at least one camera on the side of the first electronic device that is close to the obstruction, the second image including the first color or the second color, indicating that the first electronic device is close to the first area or the second area of the second electronic device; sending a first message to the second electronic device based on the at least one frame of the second image. In this way, the second display screen on the second electronic device displays different colors so that it can be captured by the first electronic device. Afterwards, the second electronic device obtains the color of the image captured by the first electronic device to determine the relative position between the two, and then displays the projection data in the corresponding area, thereby improving the user experience of screen projection.
[0018] According to the third aspect, or any implementation method of the third aspect above, the second electronic device also performs: when the screen projection request is the first connection request, displaying a first window, the first window being used to receive user input on whether to accept the screen projection connection; when the user input indicates acceptance, establishing a screen projection connection with the first electronic device.
[0019] According to the third aspect, or any implementation of the third aspect above, the second electronic device further executes: when the user input indicates refusal to accept, refusing to establish a screen projection connection with the first electronic device.
[0020] According to the third aspect, or any implementation of the third aspect above, the first electronic device includes at least one of the following: a smart phone, a tablet computer, and a laptop computer; the second electronic device includes at least one of the following: a smart TV and a desktop computer.
[0021] According to the third aspect, or any implementation of the third aspect above, during execution of the first electronic device, the first electronic device is always in a screen-on state; or, before execution of the first electronic device, the first electronic device is in a screen-on state.
[0022] In a fourth aspect, a screen projection method is provided, which is applied to a screen projection system. The screen projection system includes a first electronic device and a second electronic device, wherein the first electronic device includes a first display screen; the second electronic device includes a second display screen, and the second display screen is in a bright screen state; the method includes: after the first electronic device detects that the distance between the first electronic device and the obstruction is less than or equal to a preset first distance, and the intensity, flickering frequency, and image RGB dot matrix information of the ambient light detected by the first electronic device meet the preset first requirement, second requirement, and third requirement respectively, the first electronic device automatically scans through a first short-range wireless communication method, and automatically selects the electronic device with the strongest first short-range wireless communication signal strength scanned as the second electronic device to receive the screen projection; the first electronic device automatically sends a screen projection request to the second electronic device, establishes a screen projection connection, and transmits screen projection data; wherein the distance between the first electronic device and the obstruction, the intensity, flickering frequency, and image RGB dot matrix information of the ambient light are all detected by at least one sensor on the side of the first electronic device close to the obstruction; the second electronic device receives the screen projection request, establishes a screen projection connection; receives the screen projection data, and displays the screen projection data. In this way, when the first electronic device detects that the distance between it and the obstruction is less than or equal to the first distance, it can determine that the obstruction meets the preset requirements based on the relevant parameters of the ambient light, and can automatically screen out a second electronic device that can accept screen projection from the environment, and send screen projection data to the second electronic device. The second electronic device can then receive the screen projection data and display the screen projection data, thereby automatically completing the screen projection operation, simplifying the screen projection process, and improving the user's screen projection experience.
[0023] According to a fourth aspect, the method further includes: after establishing a screen projection connection, the second electronic device displays a first color in a first area of the second display screen and a second color in a second area of the second display screen; the first electronic device obtains at least one frame of a second image through at least one camera on the side of the first electronic device closer to the obstruction, the second image including the first color or the second color, indicating that the first electronic device is close to the first area or the second area of the second electronic device; based on the at least one frame of the second image, the first electronic device sends a first message to the second electronic device; the second electronic device receives the first message from the first electronic device, the first message indicating the first color or the second color; if the first message indicates the first color, the second electronic device displays the projection data in the first area; if the first message indicates the second color, the second electronic device displays the projection data in the second area. In this way, the second display screen on the second electronic device displays different colors to be captured by the first electronic device. Afterwards, the second electronic device obtains the color of the image captured by the first electronic device to determine the relative position between the two, and then displays the projection data in the corresponding area, thereby improving the user experience of screen projection.
[0024] According to the fourth aspect, or any implementation method of the above fourth aspect, the second electronic device also performs: when the screen projection request is the first connection request, displaying a first window, the first window is used to receive user input on whether to accept the screen projection connection; when the user input indicates acceptance, establishing a screen projection connection with the first electronic device.
[0025] According to the fourth aspect, or any implementation of the fourth aspect above, the second electronic device further executes: when the user input indicates refusal to accept, refusing to establish a screen projection connection with the first electronic device.
[0026] According to the fourth aspect, or any implementation of the fourth aspect above, the first electronic device includes at least one of the following: a smart phone, a tablet computer, and a laptop computer; the second electronic device includes at least one of the following: a smart TV and a desktop computer.
[0027] According to the fourth aspect, or any implementation of the fourth aspect above, in the method, the first electronic device is always in a screen-on state; or, before the method is executed, the first electronic device is in a screen-on state.
[0028] In a fifth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, which, when executed on a first electronic device, causes the first electronic device to execute the second aspect and any one of the implementations of the second aspect.
[0029] The fifth aspect and any implementation of the fifth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can be referred to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, and will not be repeated here.
[0030] In a sixth aspect, a computer program product is provided. When the computer program product is run on a first electronic device, the first electronic device executes the second aspect and any one of the implementations of the second aspect.
[0031] The sixth aspect and any implementation of the sixth aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the sixth aspect and any implementation of the sixth aspect can be referred to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, and will not be repeated here.
[0032] In a seventh aspect, a chip is provided. The chip includes at least one processor and an interface; the at least one processor obtains program instructions or data through the interface; and the at least one processor is configured to execute program instructions to implement the second aspect and any one of the implementations of the second aspect.
[0033] The seventh aspect and any implementation of the seventh aspect correspond to the second aspect and any implementation of the second aspect, respectively. The technical effects corresponding to the seventh aspect and any implementation of the seventh aspect can be referred to the technical effects corresponding to the above-mentioned second aspect and any implementation of the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0035] Figure 2 is a schematic diagram of the hardware structure of a first electronic device provided in an embodiment of the present application;
[0036] Figure 3 is a schematic diagram of the hardware structure of a second electronic device provided in an embodiment of the present application;
[0037] Figure 4 This is a flowchart of a screen projection method provided in an embodiment of the present application;
[0038] Figure 5 This is a schematic diagram of a step in which a first electronic device determines that a second electronic device is a screen projection display device, provided by an embodiment of the present application;
[0039] Figure 6 This is a schematic diagram of a step of selecting a second electronic device from n devices by a first electronic device according to an embodiment of the present application;
[0040] Figure 7 This is a schematic diagram of the steps for a second electronic device to display projection data provided by an embodiment of the present application;
[0041] Figure 8 This is a schematic diagram of a display interface of a second electronic device provided in an embodiment of the present application;
[0042] Figure 9 This is a schematic diagram of a display interface of a second electronic device provided in an embodiment of the present application;
[0043] Figure 10 This is a schematic diagram of a display interface of a second electronic device provided in an embodiment of the present application;
[0044] Figure 11 This is a schematic diagram of the steps for determining the location of display projection data provided by an embodiment of the present application;
[0045] Figure 12 This is a schematic diagram of displaying projection data by the relative positions of a first electronic device and a second electronic device, provided by an embodiment of the present application;
[0046] Figure 13 This is a schematic diagram of a screen projection process provided by an embodiment of the present application;
[0047] Figure 14 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship.
[0049] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized. The term "connected" includes direct and indirect connections, unless otherwise stated.
[0050] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the quantity of the technical features indicated. Therefore, a feature specified as "first" or "second" may explicitly or implicitly include one or more of the features.
[0051] In the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0052] For example, for the sake of convenience, the following takes the first electronic device 100 as a mobile phone and the second electronic device 200 as a smart TV as an example. Figure 1 To illustrate the application scenario of this application. It should be noted that the first electronic device 100 in this application is not limited to mobile phones, and other electronic devices with screen projection functions are within the scope of the first electronic device of this application. Similarly, the second electronic device 200 in this application is not limited to smart TVs, and other electronic devices that can display files projected by the first electronic device 100 are within the scope of the second electronic device of this application.
[0053] For example, Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, this application scenario involves at least two electronic devices, namely a first electronic device 100 and a second electronic device 200. The first electronic device 100 and the second electronic device 200 can establish a connection via a wireless network, and files on the first electronic device 100 can be projected onto the second electronic device 200 for display. For example, a video file on the first electronic device 100 can be projected onto the second electronic device 200 for playback.
[0054] For example, the screen projection process from the first electronic device 100 to the second electronic device 200 may include: a user initiating a screen projection request, the first electronic device 100 discovering the second electronic device 200, the user selecting the second electronic device 200, and the second electronic device 200 accepting the screen projection. As can be seen, the screen projection process is relatively lengthy and the user experience is poor.
[0055] In order to simplify the screen projection process and enhance the user's screen projection experience, the present application provides a screen projection method and electronic device. The screen projection method provided in the embodiments of the present application can automatically complete the screen projection operation between the first electronic device 100 and the second electronic device 200 when the first electronic device 100 is close to the second electronic device 200, thereby simplifying the screen projection process, reducing user operations, and enhancing the user's screen projection experience.
[0056] For example, in the embodiment of the present application, the first electronic device 100 may be an electronic device with a screen projection function. For example, a smart phone, a tablet computer, a laptop computer, or other electronic devices. For example, the first electronic device 100 may be a device including but not limited to a device equipped with Or electronic devices with other operating systems, not limited here.
[0057] The second electronic device 200 may be an electronic device that can display the file projected by the first electronic device 100. For example, a smart TV, a tablet computer, a laptop computer, or other electronic devices. Or electronic devices with other operating systems, not limited here.
[0058] For example, Figure 2 1 is a schematic diagram of the hardware structure of a first electronic device 100 provided in an embodiment of the present application. Figure 2 As shown, the first electronic device 100 may include: a processor 110, a memory 120, a display screen 130, a communication module 140, a sensor 150, and a camera 160. The processor 110, the memory 120, the display screen 130, the communication module 140, the sensor 150, and the camera 160 may be connected via a bus or other means.
[0059] The processor 110 is the computing core and control core of the first electronic device 100. The processor 110 may include one or more processing units. For example, the processor 110 may include one or more of an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Among them, different processing units can be independent devices or integrated into one or more processors.
[0060] The memory 120 may store a program that can be executed by the processor 110, causing the processor 110 to execute the method performed by the first electronic device 100 provided in the embodiments of the present application. The memory 120 may also store data. The processor 110 may read the data stored in the memory 120. The memory 120 and the processor 110 may be provided separately. Alternatively, the memory 120 may also be integrated into the processor 110.
[0061] Display screen 130 is used to display images, videos, and the like. Display screen 130 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, or a quantum dot light-emitting diode (QLED). In some examples, display screen 130 can be a touch screen.
[0062] The communication module 140 may include at least one of a mobile communication module and a wireless communication module. When the communication module 140 includes a mobile communication module, the communication module 140 may provide a solution for wireless communications including 2G / 3G / 4G / 5G applied to the first electronic device 100. For example, global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), new radio (NR), etc.
[0063] When the communication module 140 includes a wireless communication module, the communication module 140 can provide wireless communication solutions applied on the first electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), nearfield communication technology (NFC), infrared technology (IR), etc.
[0064] In addition, the communication module 140 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), and the like. The communication module 140 may receive electromagnetic waves via at least one antenna, filter, amplify, and perform other processing on the received electromagnetic waves, and transmit them to the modem for demodulation. The communication module 140 may also amplify the signals modulated by the modem, converting them into electromagnetic waves for radiation via the antenna. In some examples, at least some of the functional modules of the communication module 140 may be located within the processor 110. In some examples, at least some of the functional modules of the communication module 140 may be located within the same device as at least some of the modules of the processor 110. The communication module 140 may be one or more devices integrating at least one communication processing module. The communication module 140 receives electromagnetic waves via the antenna, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The communication module 140 may also receive signals to be transmitted from the processor 110, frequency-modulate and amplify them, and convert them into electromagnetic waves for radiation via the antenna.
[0065] The sensor 150 may include a proximity light sensor (PS) and an ambient light sensor (ALS). The proximity light sensor may include, for example, a light emitting diode (LED) and a light detector. The light emitting diode may be an infrared light emitting diode, and the light detector may be a photodiode. The proximity light sensor emits infrared light outward through the light emitting diode. The proximity light sensor uses the light detector to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the first electronic device 100. When insufficient reflected light is detected, it can be determined that there is no object near the first electronic device 100. The first electronic device 100 can use the proximity light sensor to detect whether the user holds the first electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Exemplarily, the first electronic device 100 can also use the proximity light sensor to detect whether it is close to the second electronic device 200, so as to determine whether to perform a screen projection operation. For example, the proximity light sensor can be located on the side of the first electronic device 100 where the display screen 130 is located, or on the side opposite to the display screen 130 on the first electronic device 100. In addition, the proximity light sensor can also be located at other locations on the first electronic device 100, which can be determined according to actual circumstances and is not limited here.
[0066] The ambient light sensor can be used to sense the ambient light brightness and / or flicker frequency. The ambient light sensor can include, for example, a photosensitive element (e.g., a photoresistor, a photodiode, etc.). The ambient light sensor can use the photosensitive element to convert an optical signal into an electrical signal, and then determine the ambient light brightness and / or flicker frequency from the converted electrical signal. For example, the first electronic device 100 can determine whether it is close to the display screen of the second electronic device 200 based on the ambient light brightness and flicker frequency sensed by the ambient light sensor. Furthermore, the first electronic device 100 can also adaptively adjust the brightness of the display screen 130 based on the ambient light brightness sensed by the ambient light sensor. For example, the ambient light sensor can be located on the side of the first electronic device 100 where the display screen 130 is located, or on the side opposite to the display screen 130 on the first electronic device 100. Furthermore, the ambient light sensor can also be located at other locations on the first electronic device 100, depending on actual circumstances and is not limited here. For example, the ambient light sensor can be located on the same side of the first electronic device 100 as the proximity light sensor. For example, the accuracy of the ambient light sensor in sensing ambient light brightness can be represented by 16 bits after analog-to-digital conversion (ADC). For example, the response speed of the flicker frequency of the ambient light sensor in sensing ambient light can be 7 kilo hertz (KHz).
[0067] Alternatively, the proximity light sensor and the ambient light sensor may be integrated into one sensor.
[0068] The camera 160 can be used to capture still images or videos. For example, the camera 160 can be a front-facing camera, that is, it is located on the side of the first electronic device 100 where the display screen 130 is located; in addition, the camera 160 can also be a rear-facing camera, which is located on the side opposite to the display screen 130 on the first electronic device 100, or it can be located at other locations on the first electronic device 100. The specific location can be determined according to actual conditions and is not limited here. For example, the camera 160, the ambient light sensor, and the proximity light sensor can be located on the same side of the first electronic device 100. For example, when the first electronic device 100 determines that it is close to the display screen of the second electronic device 200, it can use the camera 160 to obtain at least one frame of image of at least a partial area on the second electronic device 200, and further determine based on the image obtained by the camera 160 that the second electronic device 200 it is close to has display capabilities, that is, it determines that the second electronic device 200 has a display screen.
[0069] It is understandable that this plan Figure 2 The illustrated structure does not constitute a specific limitation on the first electronic device 100. In other embodiments of this solution, the first electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0070] For example, Figure 3 Schematic diagram of the hardware structure of a second electronic device 200 provided in an embodiment of the present application. Figure 3 As shown, the second electronic device 200 may include: a processor 210, a memory 220, a display screen 230 and a communication module 240. The processor 210, the memory 220, the display screen 230 and the communication module 240 may be connected via a bus or other means.
[0071] The processor 210 is the computing core and control core of the second electronic device 200. The processor 210 may include one or more processing units. For example, the processor 210 may include one or more of an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Among them, different processing units can be independent devices or integrated into one or more processors.
[0072] The memory 220 may store a program that can be executed by the processor 210, causing the processor 210 to execute the method performed by the second electronic device 200 provided in the embodiments of the present application. The memory 220 may also store data. The processor 210 may read the data stored in the memory 220. The memory 220 and the processor 210 may be provided separately. Alternatively, the memory 220 may also be integrated into the processor 210.
[0073] Display screen 230 is used to display images, videos, and the like. Display screen 230 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, or a quantum dot light-emitting diode (QLED). In some examples, display screen 230 can be a touch screen.
[0074] The communication module 240 may include at least one of a mobile communication module and a wireless communication module. When the communication module 240 includes a mobile communication module, the communication module 240 may provide a solution for wireless communications including 2G / 3G / 4G / 5G applied to the second electronic device 200. For example, global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-CDMA), long term evolution (LTE), new radio (NR), etc.
[0075] When the communication module 240 includes a wireless communication module, the communication module 240 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), nearfield communication technology (NFC), infrared technology (IR), etc. applied on the second electronic device 200.
[0076] In addition, the communication module 240 may include at least one filter, a switch, a power amplifier, a low-noise amplifier (LNA), and the like. The communication module 240 may receive electromagnetic waves via at least one antenna, filter, amplify, and perform other processing on the received electromagnetic waves, and transmit them to the modem for demodulation. The communication module 240 may also amplify the signals modulated by the modem, converting them into electromagnetic waves for radiation via the antenna. In some examples, at least some of the functional modules of the communication module 240 may be located within the processor 210. In some examples, at least some of the functional modules of the communication module 240 may be located within the same device as at least some of the modules of the processor 210. The communication module 240 may be one or more devices integrating at least one communication processing module. The communication module 240 receives electromagnetic waves via the antenna, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 210. The communication module 240 may also receive signals to be transmitted from the processor 210, frequency-modulate and amplify them, and convert them into electromagnetic waves for radiation via the antenna.
[0077] It is understandable that this plan Figure 3 The illustrated structure does not constitute a specific limitation on the second electronic device 200. In other embodiments of this solution, the second electronic device 200 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0078] The following combination Figure 4 , the technical solution provided by this application is described in detail. For example, Figure 4 The flowchart of a screen projection method provided by an embodiment of the present application is shown in FIG. Figure 4 In the default case, the obstruction that the first electronic device 100 is close to is the second electronic device 200. In other embodiments, the obstruction that the first electronic device 100 is close to may also be other devices, which is not limited here. Figure 4 In the illustrated process, the display screens of the first electronic device 100 and the second electronic device 200 are both in an illuminated state, where the illuminated state may also be referred to as a bright screen state. In addition, the communication modules on the first electronic device 100 and the second electronic device 200 may both include Bluetooth modules, and the Bluetooth modules are in an activated state.
[0079] like Figure 4 As shown, the screen projection method may include the following steps:
[0080] S41 : The first electronic device 100 approaches the second electronic device 200 .
[0081] Specifically, during the screen projection process, the user can manipulate the first electronic device 100 to move closer to the second electronic device 200.
[0082] For example, when the proximity light sensor and the ambient light sensor provided on the first electronic device 100 are both located on one side of the display screen on the first electronic device 100, the user can hold the first electronic device 100 close to the second electronic device 200 and control the display screen of the first electronic device 100 to face the display screen of the second electronic device 200, so that the display screen of the first electronic device 100 faces the display screen of the second electronic device 200.
[0083] For example, when the proximity light sensor and the ambient light sensor provided on the first electronic device 100 are both located on the side opposite to the display screen on the first electronic device 100, the user can hold the first electronic device 100 close to the second electronic device 200 and control the side of the first electronic device 100 opposite to its display screen to face the display screen of the second electronic device 200.
[0084] S42: The first electronic device 100 determines that the second electronic device 200 has display capability.
[0085] Specifically, after the first electronic device 100 approaches the second electronic device 200, the first electronic device 100 can detect whether the second electronic device 200 has a display capability, where having a display capability can be understood as the second electronic device having a display screen.
[0086] For example, the first electronic device 100 can detect the second electronic device 200 based on information such as the light source emitted by the second electronic device 200 to determine whether the second electronic device 200 has display capability. The specific process is described below and will not be repeated here.
[0087] S43: The first electronic device 100 selects the second electronic device 200 from the n devices in the environment according to the wireless communication signal strength between the first electronic device 100 and the n devices in the environment.
[0088] Specifically, after the first electronic device 100 determines that the second electronic device 200 has display capabilities, the first electronic device 100 can initiate a device scan to select the second electronic device 200 from n devices. In one example, the first electronic device 100 can perform the device scan using a first short-range wireless communication method. For example, the first short-range wireless communication method can be a peer-to-peer (P2P) communication method, a Bluetooth communication method, or the like.
[0089] Furthermore, after the first electronic device 100 performs a device scan, the first electronic device 100 can filter out the second electronic device 200 from the n devices based on the wireless communication signal strength between the first electronic device 100 and the second electronic device 200. Since the first electronic device 100 is close to the second electronic device 200, the wireless communication signal strength between the first electronic device 100 and the second electronic device 200 is the strongest. Therefore, the first electronic device 100 can select the electronic device with the strongest wireless communication signal strength when wirelessly communicating with it as the second electronic device 200. Among them, the second electronic device 200 is the electronic device selected by the first electronic device 100 to receive the screen projection.
[0090] Optionally, the wireless communication signal strength may be, but is not limited to, Bluetooth signal strength.
[0091] Optionally, an implementation of S43 may be Figure 6 The process shown in (A).
[0092] S44. The first electronic device 100 sends the projection data to the second electronic device 200.
[0093] Specifically, after the first electronic device 100 selects the second electronic device 200, the first electronic device 100 can send the projection data to the second electronic device 200. For example, the projection data can be the data currently displayed on the display screen of the first electronic device 100, such as the user interface (UI) data on the first electronic device 100, which can be understood as mirror projection. In addition, the projection data can also be file link data, such as a video link, etc., which can be determined according to actual conditions and is not limited here.
[0094] As a possible implementation method, before the first electronic device 100 sends the projection data to the second electronic device 200, a communication channel may be established between the first electronic device 100 and the second electronic device 200. Among them, a communication channel may be established between the first electronic device 100 and the second electronic device 200 through P2P negotiation. The process of establishing the communication channel can refer to the description of the relevant chapters in the "Wi-Fi Peer-to-Peer (P2P) Technical Specification v1.5", which will not be repeated here. In addition, before the first electronic device 100 sends the projection data to the second electronic device 200, the first electronic device 100 may also first send a projection request to the second electronic device 200 to establish a projection connection, that is, to establish a communication channel.
[0095] S45. The second electronic device 200 responds to the acquired projection data and displays the projection data.
[0096] Specifically, after the second electronic device 200 obtains the projection data, it can display the projection data on its display screen.
[0097] In one example, after receiving the user's instruction to control the screen projection data, the first electronic device 100 may send a control instruction to the second electronic device 200. For example, when the screen projection data is a video, after the user sends an instruction to play the video at a double speed on the first electronic device 100, the first electronic device 100 may send a control instruction for controlling the double speed playback to the second electronic device 200.
[0098] Therefore, after the first electronic device is close to the second electronic device, the screen projection operation can be automatically completed between the first electronic device and the second electronic device, which simplifies the screen projection process and improves the user's screen projection experience.
[0099] For example, Figure 4 The specific steps of S42 shown in FIG can be as follows Figure 5 As shown. Among them, Figure 5 In the embodiment, the first electronic device 100 includes a proximity light sensor, an ambient light sensor, and a camera, and the proximity light sensor, the ambient light sensor, and the camera are located on the same side of the first electronic device 100, and the side faces the second electronic device 200. Specifically, Figure 5 As shown, S42 may include:
[0100] S421: Determine whether a first distance between the first electronic device 100 and the second electronic device 200 is less than a preset distance.
[0101] Specifically, when the first electronic device 100 approaches the second electronic device 200, the first electronic device 100 can use the sensors thereon (for example: Figure 2 , wherein the sensor 150 may be a proximity light sensor) to determine whether the first distance between the first electronic device 100 and the second electronic device 200 is less than a preset distance. For example, when the first electronic device 100 detects an object near it using the proximity light sensor, it can be determined that the first distance between the first electronic device 100 and the second electronic device 200 is less than the preset distance, and S422 can be executed at this time; otherwise, the determination continues, that is, the step continues. Exemplarily, the preset distance can be 30 millimeters (mm) or other distances; the preset distance can be adjusted and set by the user.
[0102] S422: Acquire light source parameters of the external light source, where the light source parameters include at least one of brightness, flickering frequency, and image RGB dot matrix information.
[0103] Specifically, after the first electronic device 100 determines that the first distance is less than the preset distance, the first electronic device 100 can use a sensor thereon (for example: Figure 2 The sensor 150 shown in FIG. 1 , where the sensor 150 may be an ambient light sensor, obtains light source parameters of an external light source. The light source parameters may include at least one of brightness, flicker frequency, and image RGB dot matrix information. For example, brightness may also be referred to as intensity.
[0104] S423: Determine whether the light source parameters are within a preset parameter range.
[0105] Specifically, after obtaining the light source parameters of the external light source, the first electronic device 100 can compare the light source parameters with a preset parameter range to determine whether the light source parameters are within the preset parameter range. If the light source parameters are within the preset parameter range, S424 is executed; otherwise, it is determined that the second electronic device 200 does not have display capabilities, and S427 is executed.
[0106] For example, when the light source parameters include brightness, flicker frequency, and image RGB dot matrix information, the brightness can be compared with a preset brightness range, the flicker frequency can be compared with a preset frequency range, and the image RGB dot matrix information can be compared with a preset image mode to determine whether the brightness is within the preset brightness range and whether the first flicker frequency is within the preset frequency range. For example, the preset brightness range can be (300 nits, 1000 nits), and the preset frequency range can be [50 Hz, ∞). For example, the brightness of the light source being within the preset brightness range can be a first requirement, the flicker frequency of the light source being within the preset frequency range can be a second requirement, and the image RGB dot matrix information of the light source belonging to the preset image mode can be a third requirement. For example, the brightness of the display screen of the second electronic device 200 can be 400 nit, and the flicker frequency (i.e., refresh rate) of the display screen of the second electronic device 200 can be 60 Hz, 120 Hz, or 240 Hz, etc.
[0107] For example, the first requirement may be in the range of 200 nit to 1000 nit, which may include at least one of 200 nit and 1000 nit, or may exclude at least one of 200 nit and 1000 nit.
[0108] For example, the second requirement may be any one of 60 Hz, 120 Hz, and 240 Hz.
[0109] Exemplarily, the image RGB dot matrix information may include RGB / RGBW, where R represents red, G represents green, B represents blue, and W represents white.
[0110] It is understandable that the brightness of the display screen is often within a preset range, the flickering frequency is often within a preset frequency range, and the image RGB dot matrix information often belongs to a preset image mode. Therefore, by judging the acquired brightness and flickering frequency, it is possible to determine whether the external light source is emitted by a device with display capabilities, and then accurately determine whether the first electronic device 100 is currently close to a device with display capabilities.
[0111] S424: Acquire at least one frame of first image, and determine the confidence level that the at least one frame of first image belongs to an image of a screen (ie, display screen), where the first image is an image of at least a portion of an area on the second electronic device 200.
[0112] Specifically, in order to further determine the device that the first electronic device 100 is close to, the first electronic device 100 can use the camera on it (for example: Figure 2 The camera 160 shown in the figure, etc.) obtains at least one frame of the first image, wherein the first image is an image of at least a portion of the area on the second electronic device 200.
[0113] Furthermore, after acquiring at least one frame of the first image, the at least one frame of the first image can be input into an image recognition model to determine the confidence (also referred to as a first confidence) that the at least one frame of the first image belongs to an image on the display screen. The image recognition model can be pre-trained based on a neural network. In one example, the image recognition model can calculate the confidence of the first image through a preset algorithm after recognizing that the at least one frame of the first image includes at least one of an RGB dot matrix image and a texture pattern. Of course, the image recognition model can also directly calculate the confidence of the first image through a preset algorithm, which is not limited here.
[0114] In one example, the confidence level of the first image can be used to measure the probability that the obstruction approached by the first electronic device 100 is the second electronic device 200 and the second electronic device 200 includes a display screen.
[0115] S425: Determine whether the obtained confidence level is greater than a preset confidence threshold.
[0116] Specifically, the determined confidence level is compared with a preset confidence threshold to determine the magnitude relationship between the two. When the confidence level is greater than the preset confidence threshold, it can be determined that the at least one image belongs to a display screen image. In this case, the first electronic device 100 can determine that the device it is currently near has display capabilities, and execute S426. Otherwise, it executes S427. For example, the third requirement can be that the confidence level of the first image is greater than the preset confidence threshold.
[0117] S426: Determine whether the second electronic device 200 has display capability.
[0118] Specifically, when the first electronic device 100 approaches the second electronic device 200 and determines that the second electronic device 200 meets the above conditions, it can be determined that the second electronic device 200 has a display capability.
[0119] S427: Determine that the second electronic device 200 does not have a display capability.
[0120] Specifically, when the first electronic device 100 approaches the second electronic device 200 and determines that the second electronic device 200 does not meet any of the above conditions, it can be determined that the second electronic device 200 does not have a display capability.
[0121] It is understandable that the above S424 and S425 can be selected and executed according to actual conditions and are not limited here. When S424 and S425 are not selected and S423 determines that the light source parameters are within the preset parameter range, S426 is executed.
[0122] For example, Figure 4 An implementation method of the specific step of S43 shown in FIG can be as follows: Figure 6 As shown in (A). Figure 6 In (A), the first electronic device 100 first scans for devices using a first wireless communication method (e.g., Wi-Fi P2P communication method). Subsequently, the first electronic device 100 uses a second wireless communication method (e.g., Bluetooth communication method) and selects devices based on the signal strength of the second wireless communication method. Alternatively, device selection can be performed based on the signal strength of the first wireless communication method when scanning for devices using the first wireless communication method.
[0123] For example, Figure 6 As shown in (A), S43 may include:
[0124] S431: The first electronic device 100 obtains a device list of n devices in an environment, where the device list includes device identifications and device information, and n is a positive integer greater than or equal to 1.
[0125] Specifically, the first electronic device 100 can perform device scanning through a first wireless communication method (for example, a Wi-Fi P2P communication method) to obtain a device list of n devices in the environment. The device list may include a device identifier and device information of each device, where n is a positive integer greater than or equal to 1. In one example, the device information may include an Internet Protocol address (IP address). In one example, S431 can be executed by an application module in the first electronic device 100. Exemplarily, the application module may be a Huawei screen projection application module (Airsharing module).
[0126] In one embodiment, the list can be expressed as Table[ID,IE], where Table[] represents an array, ID represents a device identifier, and IE represents device information, including the device's MAC address, IP address, wireless transmission capability, and the like.
[0127] As a possible implementation method, the first electronic device 100 and n devices can communicate in a peer-to-peer (P2P) manner through the Wi-Fi Direct standard. The communication process between the first electronic device 100 and n devices can refer to the description of the relevant chapters in the "Wi-Fi Peer-to-Peer (P2P) Technical Specification v1.5", which will not be repeated here. It can be understood that when the first electronic device 100 and n devices communicate in a peer-to-peer manner, the first electronic device 100 and the n devices need to support Wi-Fi Direct. In addition, the first electronic device 100 and n devices can also establish a point-to-point connection between devices through a tunneled direct link setup (TDLS). At this time, the first electronic device 100 and n devices may not support Wi-Fi Direct.
[0128] After the first electronic device 100 communicates with each of the n devices, the first electronic device 100 can obtain a device list of the n devices.
[0129] S432: The first electronic device 100 obtains the second distances between the first electronic device and j devices in the environment respectively, to obtain j second distances, where j is a positive integer greater than or equal to 1.
[0130] Specifically, the first electronic device 100 may respectively obtain the second distances between itself and j devices in the environment, and obtain j second distances, where j is a positive integer greater than or equal to 1.
[0131] For example, the first electronic device 100 may determine the second distance between itself and each of the j devices based on the communication signal data between itself and each of the j devices. The communication signal data may include a Bluetooth received signal strength indication (RSSI), i.e., Bluetooth signal strength, also referred to as Bluetooth RSSI. It is understood that when the communication signal data includes Bluetooth RSSI, each of the j devices has a Bluetooth module.
[0132] Here, taking the first electronic device 100 obtaining the second distance between itself and the rth device among the j devices as an example, the second distance can be obtained by the following formula.
[0133] d r =10 abs(RSSI)-A / 10n Formula (1)
[0134] Among them, d r is the second distance between the first electronic device 100 and the rth device; abs(x) is the absolute value function; RSSI is the average RSSI between the first electronic device 100 and the rth device among the j devices; A is the signal strength when the first electronic device 100 is 1 meter away from any device with a Bluetooth module (other distances are also possible), where A can be pre-calibrated; n is the environmental attenuation factor, which can be set based on experience. It is understood that the first electronic device 100 determines the second distance between itself and each of the j devices using the above formula (1).
[0135] It is understandable that when the first electronic device 100 obtains the distance between itself and a device in the environment, it can also obtain the device identification of the device. In other words, the two can obtain each other's device identification during the interaction process.
[0136] In one example, S432 may be executed by a module in the first electronic device 100 , such as a Huawei near-field discovery module (Nearby module).
[0137] S433: The first electronic device 100 selects the second electronic device 200 from the n devices according to the j second distances and the acquired device list.
[0138] Specifically, after obtaining j second distances, the first electronic device 100 can filter out the second electronic device 200 from the n devices based on the j second distances and the obtained device list, thereby determining the second electronic device 200. In one example, considering that not all devices in an environment can perform P2P communication or Bluetooth communication, after determining the distance based on Bluetooth signal strength, the second electronic device 200 can be filtered out from the device list obtained by P2P communication based on device information obtained by Bluetooth communication.
[0139] As a possible implementation method, the specific steps of S433 can be as follows: Figure 6 As shown in (B). Figure 6 As shown in (B), specifically, S433 may include:
[0140] S4331. Sort the j second distances from small to large.
[0141] Specifically, the j second distances may be sorted from small to large. Of course, they may also be sorted from large to small, which is not limited here.
[0142] S4332. Determine whether the device corresponding to the i-th second distance among the j second distances is located in the acquired device list, where the initial value of i is 1.
[0143] Specifically, based on the device identifier of the device corresponding to the i-th second distance among the j second distances, the device list obtained in S43 can be queried to determine whether the device identifier of the device corresponding to the i-th second distance exists in the obtained device list; where the initial value of i is 1. When the device identifier of the device corresponding to the i-th second distance exists in the obtained device list, it is determined that the device corresponding to the i-th second distance is the second electronic device 200, that is, S4333 is executed; otherwise, S4334 is executed.
[0144] S4333: Determine that the device corresponding to the i-th second distance is the second electronic device 200.
[0145] Specifically, when the device identifier of the device corresponding to the i-th second distance exists in the acquired device list, it can be determined that the device corresponding to the i-th second distance is the second electronic device 200. At this time, the second electronic device 200 is screened out from the n devices, and the screening process ends.
[0146] S4334, i=i+1, determine whether i is greater than j.
[0147] Specifically, if the device ID corresponding to the i-th second distance does not exist in the acquired device list, i can be updated by i=i+1, and it is determined whether the updated i is less than or equal to j. If the updated i is less than or equal to j, the process returns to S4332. If the updated i is greater than j, the process ends.
[0148] It is understood that when sorting the j second distances from largest to smallest, the initial value of i in S4332 is j. S4334 can be replaced by i=i-1 to determine whether i is greater than or equal to 1. The remaining steps are similar to those for sorting the j second distances from smallest to largest and are not further described here.
[0149] It is understandable that when Figure 4 If Bluetooth communication is used during device scanning in S43, the first electronic device 100 can directly select the electronic device with the strongest wireless communication signal strength as the second electronic device 200 based on the wireless communication signal strength between it and n devices in the environment.
[0150] In one example, Figure 4 The specific steps of S45 shown in FIG can be as follows Figure 7 As shown. Among them, when the screen is projected between the first electronic device 100 and the second electronic device 200 for the first time, the second electronic device 200 can output a prompt message to allow the user to confirm whether to project the screen to the second electronic device 200, thereby avoiding the situation where the first electronic device 100 mistakenly identifies the second electronic device 200. After the user confirms to project the screen on the second electronic device 200, the second electronic device 200 can record the identity information of the first electronic device 100, so as to confirm the identity of the first electronic device 100 based on the identity information when the screen is projected next time, thereby avoiding the user's reconfirmation and improving the user experience. In an example, when the identity information of the first electronic device 100 is recorded in the second electronic device 200, it can be understood that the binding between the first electronic device 100 and the second electronic device 200 has been successful.
[0151] Specifically, if Figure 7 As shown, S45 may include:
[0152] S451: The second electronic device 200 determines whether it has recorded the identity information of the first electronic device 100.
[0153] Specifically, after the second electronic device 200 obtains the projection data, it can query the device identity information recorded in it to determine whether the identity information of the first electronic device 100 is recorded. If the identity information of the first electronic device 100 is not recorded in the second electronic device 200, it indicates that this is the first projection between the first electronic device 100 and the second electronic device 200. At this time, the second electronic device 200 can prompt the user for confirmation, that is, execute S452; otherwise, execute S453.
[0154] It is understandable that S451 can be selectively executed according to actual conditions and is not limited here.
[0155] S452. The second electronic device 200 outputs prompt information, which is used to prompt the user whether to perform a screen projection operation.
[0156] Specifically, the second electronic device 200 can output a prompt message for prompting the user whether to perform a screen projection operation. For example, the prompt message can be one or more of text information, voice information, and graphic information. For example, Figure 8 As shown, the prompt information output by the second electronic device 200 can be text information, wherein the second electronic device 200 can display the text information of "whether to accept the screen projection of the first electronic device 100" on its display screen.
[0157] S453. The second electronic device 200 determines whether it has obtained confirmation information confirming screen projection.
[0158] Specifically, after the second electronic device 200 outputs the prompt information, it can determine whether it has obtained confirmation information confirming the screen projection.
[0159] Among them, when the second electronic device 200 obtains the confirmation information sent by the user to confirm the screen projection, the second electronic device 200 can determine that it has obtained the confirmation information to confirm the screen projection, and then executes S455. Figure 8 If the user selects the "Yes" button in area a1, the second electronic device 200 obtains confirmation information for confirming the screen projection.
[0160] If the second electronic device 200 receives a rejection message from the user rejecting screen projection, or if the second electronic device 200 does not receive a confirmation message confirming screen projection or a rejection message rejecting screen projection within a preset time period, S454 is executed. Figure 8 If the user selects the "No" button in area a2, the second electronic device 200 obtains the rejection information of rejecting the screen projection.
[0161] S454, end the screen projection process.
[0162] Specifically, when the user refuses screen projection or the user does not make a choice within a preset time period, the screen projection process ends.
[0163] S455. The second electronic device 200 displays the projection data.
[0164] Specifically, the second electronic device 200 may display the projection data on its display screen. Figure 9 As shown, when the projection data sent by the first electronic device 100 is the display data of its desktop, the desktop of the first electronic device 100 can be displayed on the second electronic device 200.
[0165] It should be noted that Figure 7 Only Figure 4 An example of an S45; not an indication Figure 4 The S45 can only be Figure 7 Alternatively, Figure 4 The S45 can be Figure 7 S455, that is, after receiving the projection data, the second electronic device 200 directly displays the projection data, without steps S451-S454.
[0166] The above is an introduction to the screen projection method provided in the embodiment of the present application. It is understandable that in the embodiment of the present application, when the second electronic device 200 displays the projection data, it can display the projection data in full screen, or it can display the projection data at a pre-set position on its display screen, or it can display the projection data based on the relative position between the first electronic device 100 and the second electronic device 200. The specific method can be determined according to actual conditions and is not limited here.
[0167] For example, see Figure 9 At this time, it can be understood that the second electronic device 200 displays the projection data in full screen.
[0168] For example, if the preset display position on the second electronic device 200 is in the right area of its display screen, then Figure 10 As shown, the second electronic device 200 can display the projection data in the right area of its display screen.
[0169] For example, before the second electronic device 200 displays the projection data, the position of the first electronic device 100 relative to the second electronic device 200 (for example, the left side or the right side) can be determined first, and then the projection data is displayed at the corresponding position of the display screen on the side of the determined position (for example, first determine that the first electronic device 100 is located at the left screen position of the second electronic device 200, then display the projection data on the left screen of the display screen of the second electronic device 200). Exemplarily, after receiving one or more inputs (for example, receiving a screen projection request or receiving user input), the second electronic device 200 displays different colors in different areas on the display screen (for example, the left screen displays green, the right screen displays blue, etc.; the correspondence between different areas and different colors is preset and can be adjusted by the user); in this way, when the first electronic device 100 is close to the display screen of the second electronic device, it can detect the RGB dot matrix information of the image through the ambient light sensor, the proximity light sensor, etc., and then notify the second electronic device 200 of the RGB dot matrix information. The second electronic device 200 obtains which side of the display screen of the second electronic device (for example, the left or right) the first electronic device 100 is close to based on the preset correspondence between different positions on the display screen and different colors. That is to say, the first electronic device 100 collects the color through the camera thereon (the color can be used to indicate the relative position between the first electronic device 100 and the second electronic device 200) and sends it to the second electronic device 200. Thus, the second electronic device 200 can determine the relative position of the second electronic device 200 and the first electronic device 100 based on the acquired color, and then display the projection data in the corresponding area on the display screen of the second electronic device 200.
[0170] Specifically, if Figure 11 As shown, the following steps may be included:
[0171] S1101. The second electronic device 200 displays different colors in different areas of its display screen based on a preset mapping relationship between different areas and different colors on the display screen.
[0172] Specifically, the second electronic device 200 can display different colors in different areas of its display screen based on a pre-set mapping relationship between different areas on the display screen and different colors. For example, the second electronic device 200 can display red in the left area of its display screen and blue in the right area of its display screen. The different colors corresponding to different areas on the display screen of the second electronic device 200 can be pre-set.
[0173] S1102: The first electronic device 100 obtains at least one frame of the second image, and determines a target color represented by the at least one frame of the second image.
[0174] Specifically, the first electronic device 100 can use the front camera thereon (for example: Figure 2 ) to obtain at least one frame of the second image, and input the at least one frame of the second image into the image recognition model to determine the target color represented by the at least one frame of the second image. Since the mapping relationship between different areas and different colors on the display screen of the second electronic device 200 is pre-set on the second electronic device 200, the second electronic device 200 can determine the corresponding display area by the color of the image collected by the first electronic device 100, and the image collected by the first electronic device 100 is collected by the first electronic device 100 at a specific position, and the area on the second electronic device 200 corresponding to the specific position is the corresponding display area. Therefore, the target color determined by the first electronic device 100 can represent the relative position between the first electronic device 100 and the second electronic device 200. In addition, the image recognition model can be pre-trained based on a neural network.
[0175] S1103 : The first electronic device 100 sends a target color to the second electronic device 200 .
[0176] Specifically, after determining the target color, the first electronic device 100 may send the target color to the second electronic device 200 .
[0177] S1104: The second electronic device 200 searches for a preset mapping relationship between different areas displaying different colors on a display screen according to the target color, and determines the target display area.
[0178] Specifically, after the second electronic device 200 obtains the target color, it can use the target color to query the mapping relationship between different colors displayed in different areas of the pre-set display screen, and determine the target display area corresponding to the target color, wherein the target display area is the area where the projection data is displayed. In this way, the second electronic device 200 determines the location where the projection data needs to be displayed. For example, Figure 12 As shown in (A), the user controls the mobile phone A to be close to the left side of the display screen of the smart TV B. At this time, the smart TV B can be Figure 11 The steps shown in FIG. 1 determine that the target display area is the left area of the display screen; further, as shown in FIG. Figure 12 As shown in (B), smart TV B can display the projection data (i.e., the desktop of mobile phone A) on the left side of its display screen, while continuing to display the data displayed before projection in other areas of the display screen.
[0179] It is understandable that when the second electronic device 200 displays the projection data in the target display area of its display screen, it can display the data displayed before the projection in other areas of its display screen.
[0180] It is understandable that Figure 11 The step of determining the target display area described above can be performed at any time before the second electronic device 200 displays the projection data, and is not limited here. Figure 11 The described steps may be performed after the first electronic device 100 and the second electronic device 200 establish a connection.
[0181] It is understandable that the execution order of each step in any embodiment of the present application can be adjusted according to actual conditions without any contradiction, and the adjusted technical solution is also within the scope of the present application.
[0182] To facilitate understanding of the screen projection method provided in the embodiment of the present application, the screen projection operation process is introduced below with examples.
[0183] For example, Figure 13 A screen projection operation process is shown. Figure 13 The first electronic device 100 is a mobile phone A, and the second electronic device 200 is a smart TV B. The display screens of mobile phone A and smart TV B are both in the bright screen state, both have Bluetooth modules, and both Bluetooth modules are in the turned-on state; in addition, the interface currently displayed by mobile phone A is the desktop.
[0184] like Figure 13 As shown in (A), when casting the screen, the user can hold mobile phone A close to smart TV B and control the display screen of mobile phone A to face the display screen of smart TV B. After mobile phone A is close to smart TV B, mobile phone A can Figure 4 The steps described in the above are used to filter out smart TV B and send the projection data to smart TV B. After smart TV B obtains the projection data, it can Figure 7 The steps described in the above section determine whether this is the first time screen casting between it and mobile phone A.
[0185] Furthermore, when smart TV B determines that it is the first time to cast screens to mobile phone A, smart TV B can display the following: Figure 13 The interface shown in (B). Figure 13 In the interface shown in (B), when the user selects "Accept", the smart TV B displays the following Figure 13 The interface shown in (C) shows the projection data. The location of the projection data can be determined by the above Figure 11 The steps described are OK.
[0186] When smart TV B determines that this is not the first time that it and mobile phone A are casting screens together, smart TV B can display the following information: Figure 13 The interface shown in (C) shows the projection data. The location of the projection data can be determined by the above Figure 11 The steps described are OK.
[0187] Based on the method in the above embodiment, the present application embodiment also provides a chip. Figure 14 , Figure 14 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. Figure 14 As shown, the chip 1400 includes one or more processors 1401 and an interface circuit 1402. Optionally, the chip 1400 may also include a bus 1403.
[0188] The processor 1401 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 1401 or an instruction in the form of software. The above-mentioned processor 1401 can be a general-purpose processor, a digital communicator (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods and steps disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The interface circuit 1402 can be used for sending or receiving data, instructions or information. The processor 1401 can use the data, instructions or other information received by the interface circuit 1402 to process, and the processing completion information can be sent out through the interface circuit 1402.
[0189] Optionally, the chip also includes a memory, which may include a read-only memory and a random access memory, and provides operating instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM). Optionally, the memory stores executable software modules or data structures, and the processor can perform corresponding operations by calling operating instructions stored in the memory (the operating instructions may be stored in the operating system).
[0190] Optionally, the interface circuit 1402 may be configured to output the execution result of the processor 1401 .
[0191] It should be noted that the corresponding functions of the processor 1401 and the interface circuit 1402 can be implemented through hardware design, software design, or a combination of hardware and software, and there is no limitation here.
[0192] It should be understood that each step of the above method embodiment can be completed by a hardware-based logic circuit or a software-based instruction in a processor. The chip can be applied to the first electronic device 100 or the second electronic device 200 to implement the method provided in the embodiment of the present application.
[0193] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0194] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0195] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in 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 via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)).
[0196] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.
Claims
1. A first electronic device, characterized in that: The first electronic device includes: a memory storing one or more computer programs; The processor is coupled to the memory and is configured to, when the one or more computer programs are executed by the processor, cause the first electronic device to perform: After the first electronic device detects that the distance between the first electronic device and the second electronic device is less than or equal to a preset first distance, and the intensity of the ambient light detected by the first electronic device is within a preset brightness range, the flickering frequency of the ambient light is within a preset frequency range, and the RGB dot matrix information of the image of the ambient light belongs to a preset image mode, the first electronic device automatically scans through a first short-range wireless communication method, and automatically selects the electronic device with the strongest first short-range wireless communication signal strength scanned as the second electronic device to receive the screen projection; Automatically sending a screen projection request to the second electronic device, establishing a screen projection connection, and transmitting the screen projection data; The distance between the first electronic device and the second electronic device, the intensity of the ambient light, the flickering frequency and the image RGB dot matrix information are all detected by at least one sensor on the side close to the first electronic device and the second electronic device.
2. The first electronic device according to claim 1, wherein: After the intensity of the ambient light detected by the first electronic device is within a preset brightness range, the flickering frequency of the ambient light is within a preset frequency range, and the RGB dot matrix information of the image of the ambient light belongs to a preset image mode, the first electronic device further executes: Acquire at least one frame of a first image through at least one camera on a side of the first electronic device that is close to the second electronic device; Calculating a first confidence level based on the at least one first image frame and a preset algorithm; the first confidence level is used to measure a probability that the first electronic device is close to the second electronic device and that the second electronic device includes a display screen; After the first confidence level is greater than a preset confidence level threshold, scanning is automatically performed using a first short-range wireless communication method.
3. The first electronic device according to claim 2, wherein: After acquiring the at least one frame of the first image, the first electronic device further executes: After recognizing that the at least one frame of the first image includes at least one of an RGB dot matrix image and a texture pattern, the first confidence level is calculated based on the at least one frame of the first image and a preset algorithm.
4. The first electronic device according to any one of claims 1 to 3, characterized in that: After automatically selecting the electronic device with the strongest first short-range wireless communication signal strength as the second electronic device to receive screen projection, the first electronic device further performs: Obtain a relative position relationship between the first electronic device and the second electronic device; wherein the screen projection request includes the relative position relationship.
5. The first electronic device according to claim 4, characterized in that The first electronic device includes at least one of the following: a smart phone, a tablet computer, and a laptop computer; the second electronic device includes at least one of the following: a smart TV and a desktop computer.
6. A screen projection method, characterized in that: Applied to a first electronic device, the method includes: When the first electronic device detects that the distance between the first electronic device and the second electronic device is less than or equal to a preset first distance, and the intensity of the ambient light detected by the first electronic device is within a preset brightness range, the flickering frequency of the ambient light is within a preset frequency range, and the RGB dot matrix information of the image of the ambient light belongs to a preset image mode, the first electronic device automatically scans through a first short-range wireless communication method, and automatically selects the electronic device with the strongest first short-range wireless communication signal strength scanned as the second electronic device to receive the screen projection; Automatically sending a screen projection request to the second electronic device, establishing a screen projection connection, and transmitting the screen projection data; The distance between the first electronic device and the second electronic device, the intensity of the ambient light, the flickering frequency and the image RGB dot matrix information are all detected by at least one sensor on the side close to the first electronic device and the second electronic device.
7. The method according to claim 6, characterized in that After the intensity of the ambient light detected by the first electronic device is within a preset brightness range, the flickering frequency of the ambient light is within a preset frequency range, and the RGB dot matrix information of the image of the ambient light belongs to a preset image mode, the method further includes: Acquire at least one frame of a first image through at least one camera on a side of the first electronic device that is close to the second electronic device; Calculating a first confidence level based on the at least one first image frame and a preset algorithm; the first confidence level is used to measure a probability that the first electronic device is close to the second electronic device and that the second electronic device includes a display screen; After the first confidence level is greater than a preset confidence level threshold, scanning is automatically performed using a first short-range wireless communication method.
8. The method according to claim 7, characterized in that After acquiring the at least one frame of the first image, the method further includes: After recognizing that the at least one frame of the first image includes at least one of an RGB dot matrix image and a texture pattern, the first confidence level is calculated based on the at least one frame of the first image and a preset algorithm.
9. The method according to any one of claims 6 to 8, characterized in that After automatically selecting the electronic device with the strongest first short-range wireless communication signal strength as the second electronic device to receive screen projection, the method further includes: Obtain a relative position relationship between the first electronic device and the second electronic device; wherein the screen projection request includes the relative position relationship.
10. A screen projection system, characterized in that: include: a first electronic device and a second electronic device; The first electronic device includes a first display screen; The second electronic device includes a second display screen, and the second display screen is in a bright screen state; The first electronic device includes: a first memory storing one or more computer programs; A first processor, coupled to the first memory, is configured to, when the one or more computer programs are executed by the first processor, cause the first electronic device to perform: After the first electronic device detects that the distance between the first electronic device and the second electronic device is less than or equal to a preset first distance, and the intensity of the ambient light detected by the first electronic device is within a preset brightness range, the flickering frequency of the ambient light is within a preset frequency range, and the RGB dot matrix information of the image of the ambient light belongs to a preset image mode, the first electronic device automatically scans through a first short-range wireless communication method, and automatically selects the electronic device with the strongest first short-range wireless communication signal strength scanned as the second electronic device to receive the screen projection; Automatically sending a screen projection request to the second electronic device, establishing a screen projection connection, and transmitting the screen projection data; The distance between the first electronic device and the second electronic device, the intensity of the ambient light, the flickering frequency of the ambient light, and the RGB dot matrix information of the ambient light image are all detected by at least one sensor on a side close to the first electronic device and the second electronic device; The second electronic device includes: a second memory storing one or more computer programs; The second processor is coupled to the second memory and is configured to, when the one or more computer programs are executed by the second processor, cause the second electronic device to perform: Receiving the screen projection request, and establishing the screen projection connection; The projection data is received and displayed.
11. The screen projection system according to claim 10, characterized in that: The second electronic device further performs: After the screen projection connection is established, a first color is displayed in a first area of the second display screen, and a second color is displayed in a second area of the second display screen; receiving a first message from the first electronic device, where the first message is used to indicate the first color or the second color; If the first message indicates the first color, displaying the projection data in the first area; If the first message indicates the second color, displaying the projection data in the second area; The first electronic device further performs: capturing, using at least one camera on a side of the first electronic device that is close to the second electronic device, at least one second image, where the second image includes a first color or a second color, indicating that the first electronic device is close to a first area or a second area of the second electronic device; The first message is sent to the second electronic device according to the at least one frame of the second image.
12. The screen projection system according to claim 11, characterized in that: The second electronic device further performs: When the screen projection request is a first connection request, displaying a first window, wherein the first window is used to receive user input on whether to accept the screen projection connection; When the user input indicates acceptance, a screen projection connection is established with the first electronic device.
13. A screen projection method, applied to a screen projection system, characterized in that: The screen projection system includes a first electronic device and a second electronic device, wherein the first electronic device includes a first display screen; the second electronic device includes a second display screen, and the second display screen is in a bright screen state; the method includes: After the first electronic device detects that the distance between the first electronic device and the second electronic device is less than or equal to a preset first distance, and the intensity of the ambient light detected by the first electronic device is within a preset brightness range, the flickering frequency of the ambient light is within a preset frequency range, and the RGB dot matrix information of the image of the ambient light belongs to a preset image mode, the first electronic device automatically scans through a first short-range wireless communication method, and automatically selects the electronic device with the strongest first short-range wireless communication signal strength scanned as the second electronic device to receive the screen projection; The first electronic device automatically sends a screen projection request to the second electronic device, establishes a screen projection connection, and transmits screen projection data; The distance between the first electronic device and the second electronic device, the intensity of the ambient light, the flickering frequency, and the RGB dot matrix information of the image are all detected by at least one sensor on a side close to the first electronic device and the second electronic device; The second electronic device receives the screen projection request and establishes the screen projection connection; receives the screen projection data and displays the screen projection data.
14. The screen projection method according to claim 13, wherein: The method further comprises: After establishing the screen projection connection, the second electronic device displays a first color on a first area of the second display screen and displays a second color on a second area of the second display screen; The first electronic device captures at least one second image through at least one camera on a side of the first electronic device that is closer to the second electronic device, where the second image includes a first color or a second color, indicating that the first electronic device is close to a first area or a second area of the second electronic device; The first electronic device sends a first message to the second electronic device according to the at least one second image frame; The second electronic device receives a first message from the first electronic device, where the first message is used to indicate the first color or the second color; If the first message indicates the first color, the second electronic device displays the projection data in the first area; If the first message indicates the second color, the second electronic device displays the projection data in the second area.
15. The method according to claim 14, characterized in that The method further comprises: When the screen projection request is a first connection request, the second electronic device displays a first window, where the first window is used to receive user input on whether to accept the screen projection connection; When the user input indicates acceptance, the second electronic device establishes a screen projection connection with the first electronic device.
16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program runs on the first electronic device, the first electronic device executes the screen projection method as described in any one of claims 6 to 9.
17. A computer program product, characterized in that When the computer program product runs on a first electronic device, the first electronic device executes the screen projection method as described in any one of claims 6 to 9.