Screen projection method and device and electronic equipment

By creating a virtual screen on the first electronic device and sending screen projection data, the problem that the interface only displays on the second device during the heterogeneous screen projection is solved, and the effect of multiple screens is achieved simultaneously and power consumption is reduced.

CN119668540APending Publication Date: 2025-03-21HUAWEI DEVICE CO LTD

Patent Information

Application Number
CN202311215613.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

During the heterogeneous screen projection process, the screen projection interface is only displayed on the second electronic device, and does not display on the first electronic device, which affects the user experience.

Method used

By creating a virtual screen on the first electronic device and generating a user interface of the application on the virtual screen, the first electronic device sends the screen projection data to the second electronic device, and simultaneously copying the user interface to the display screen of the first electronic device to display.

Benefits of technology

Multiple screens of the first electronic device and the second electronic device are realized, improving the user experience, and reducing power consumption during the screen projection process by creating only one virtual screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668540A_ABST
    Figure CN119668540A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electronic equipment, and discloses a screen projection method and device and electronic equipment, which are used for realizing multi-screen simultaneous watching during different-source screen projection. The method is applied to a screen projection system and comprises the steps that first electronic equipment responds to screen projection operation of a user for an application, creates a first virtual screen and generates a user interface of the application on the first virtual screen; the first electronic equipment can copy the user interface generated on the first virtual screen to the display screen of the first electronic equipment for display while projecting the user interface of the application generated on the first virtual screen to the second electronic equipment, so that multi-screen simultaneous watching of the first electronic equipment and the second electronic equipment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of electronic devices, and in particular, to a screen projection method, device and electronic device. Background Art

[0002] With the development of life and technology, the application of screen projection technology is becoming more and more extensive. Among them, screen projection technology refers to the ability of an electronic device to project the display interface on its display screen to another electronic device for display. For example, a movie on a mobile phone can be projected to play on a computer, and a video on the central control screen of a car can be projected to display on a tablet, etc.

[0003] However, when the first electronic device performs heterogeneous screen projection on the second electronic device, the screen projection interface is only displayed on the second electronic device but not on the first electronic device, which affects the user experience. Summary of the invention

[0004] The embodiments of the present application provide a screen projection method, device and electronic device for realizing multi-screen viewing when projecting from different sources and reducing power consumption.

[0005] In a first aspect, an embodiment of the present application provides a screen projection method, which is applied to a screen projection system. The screen projection system includes a first electronic device and a second electronic device. The method includes:

[0006] The first electronic device can create a first virtual screen in response to a user's screen projection operation for an application. After the first electronic device generates a user interface of the application on the created first virtual screen, it sends the projection data to the second electronic device, and copies the user interface generated on the first virtual screen to the display screen of the first electronic device for display. The projection data includes the user interface of the application generated on the first virtual screen.

[0007] In this method, the first electronic device creates a first virtual screen in response to the user's screen projection operation for the application, and generates a user interface of the projected application on the first virtual screen. The first electronic device can send the projection data containing the user interface displayed on the first virtual screen to the second electronic device, and can also copy the user interface generated on the first virtual screen to the display screen of the first electronic device for display, thereby realizing multi-screen viewing of the first electronic device and the second electronic device. In addition, the first electronic device only creates the first virtual screen during the implementation process, which reduces the power consumption of the projection screen compared to similar solutions of creating multiple virtual screens.

[0008] In an optional design, the first electronic device creates a first virtual screen according to screen parameters of the display screen of the first electronic device in response to the screen projection operation.

[0009] Through this design, the first virtual screen created by the first electronic device has completely consistent screen parameters with the display screen of the first electronic device. In this way, the user interface generated on the first virtual screen can be directly copied to the display screen of the first electronic device for display, thereby achieving the purpose of reducing power consumption.

[0010] In an optional design, the first electronic device generates identification information of the first virtual screen and establishes a mapping relationship between the identification information and the application.

[0011] Through this design, the first electronic device establishes a mapping relationship between the identification information of the first virtual screen and the application, which can provide a data basis for the first electronic device to determine the first virtual screen for generating the user interface of the application. In this way, the first electronic device can quickly determine the first virtual screen for generating the user interface according to the mapping relationship, perform layer replication, and display the user interface on the display screen of the first electronic device, thereby improving the efficiency of interface display.

[0012] In an optional design, the first electronic device may also generate projection data based on the user interface generated on the first virtual screen, and send the projection data to the second electronic device, wherein the projection data is used for the second electronic device to display the user interface of the application in the projection window.

[0013] Through this design, the first electronic device can complete heterogeneous screen projection, projecting the user interface of the application of the first electronic device to the second electronic device for display, thereby playing the user interface of the application on the second electronic device.

[0014] In an optional design, the first electronic device obtains layer data of the user interface generated on the first virtual screen, performs layer synthesis on the layer data to obtain image data, and encodes the image data to obtain projection data.

[0015] Through this design, the first electronic device can obtain the user interface of the application from the first virtual screen in real time, and generate screen projection data sent to the second electronic device based on the user interface, so that the second electronic device can display the user interface on the display screen according to the received screen projection data. In this way, the second electronic device can play the application synchronously, thereby realizing multi-screen simultaneous viewing.

[0016] In an optional design, the first electronic device creates a native window, and the native window is used to display the user interface of the application on the display screen of the first electronic device. The first electronic device can also copy the user interface generated on the first virtual screen to the native window and display the user interface in the native window.

[0017] Through this design, during the screen projection process, the first electronic device can copy the user interface generated on the first virtual screen to a local native window and display the user interface in the native window, so that the first electronic device can also display the user interface on the display screen of the first electronic device when performing heterogeneous screen projection, thereby enabling the first electronic device and the second electronic device to view applications simultaneously, thereby improving the user experience.

[0018] In an optional design, after creating the native window, the first electronic device may also determine the first virtual screen for generating the user interface of the application according to the mapping relationship between the identification information of the first virtual screen and the application.

[0019] Through this design, the first electronic device can quickly and accurately determine the first virtual screen for generating the user interface of the application, and perform layer-by-layer replication of the user interface on the first virtual screen to achieve the purpose of displaying the user interface on the display screen of the first electronic device, thereby improving the accuracy and efficiency of locally displaying the user interface.

[0020] In an optional design, the first electronic device performs layer replication on the user interface generated on the first virtual screen to obtain layer data of the user interface. The first electronic device performs layer synthesis on the layer data to obtain image data. The first electronic device displays the user interface in a native window based on the image data.

[0021] Through this design, the first electronic device can copy the user interface generated on the first virtual screen and display it in the native window, so as to display the user interface locally during the heterogeneous screen projection process, thereby achieving synchronous playback of the application on the first electronic device and the second electronic device.

[0022] In an optional design, the first electronic device may also determine that the first electronic device and the second electronic device display the user interface of the application after detecting a screen projection operation triggered by the user on the application.

[0023] Through this design, the user can choose whether to display the application on the first electronic device and the second electronic device separately, or to play the application simultaneously on the first electronic device and the second electronic device. The first electronic device can determine whether the user interface of the application needs to be displayed on both the second electronic device and the first electronic device at the same time. This can improve the flexibility of screen projection and the user experience.

[0024] In a second aspect, the present application provides a screen projection device, applied to a first electronic device, the screen projection device comprising:

[0025] A display screen, used for displaying a user interface;

[0026] A communication unit for receiving and sending data;

[0027] A processing unit is used to create a first virtual screen in response to a user's screen projection operation on an application, and generate a user interface of the application on the first virtual screen; send projection data to a second electronic device; the projection data includes the user interface of the application generated on the first virtual screen; and copy the user interface generated on the first virtual screen to a display screen of the first electronic device for display.

[0028] In a third aspect, the present application provides an electronic device, comprising a display screen, one or more processors, and one or more memories. The display screen is used to display a user interface; the one or more memories are used to store one or more computer programs and data information; the one or more processors are used to execute the computer programs stored in the one or more memories, so that the electronic device executes the method described in any aspect of the first aspect. The electronic device may be the first electronic device of the first aspect.

[0029] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program or instructions are stored. When the computer program or instructions are executed by a computing device, the computing device executes any aspect of the above-mentioned first aspect, and any possible implementation of any aspect.

[0030] In a fifth aspect, an embodiment of the present application provides a chip, which is coupled to a memory in an electronic device so that the chip calls a computer program stored in the memory during operation to implement a method that may be designed in any aspect of the first aspect of the embodiment of the present application.

[0031] In a sixth aspect, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a computing device, the computing device executes the method in any aspect of the above-mentioned first aspect and any possible implementation of any aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a schematic diagram of the architecture of a screen projection system;

[0033] Figure 2 A schematic diagram of a possible hardware structure of an electronic device provided as an example for this application;

[0034] Figure 3 A schematic diagram of a multi-screen collaboration scenario provided as an example for this application;

[0035] Figure 4 A flowchart of a screen projection method provided in this application;

[0036] Figure 5A schematic diagram of an application scenario of a screen projection method provided in this application;

[0037] Figure 6 A schematic diagram of a screen projection operation provided by this application;

[0038] Figure 7 A schematic diagram of a display interface provided by this application;

[0039] Figure 8 A schematic diagram of another screen projection operation provided for this application;

[0040] Fig. 9 A schematic diagram of the structure of an operating system of a first electronic device provided in this application;

[0041] Fig.10 A schematic diagram of a screen projection scenario provided for this application;

[0042] Fig.11 A schematic diagram of the structure of a second electronic device provided in this application;

[0043] Fig.12 A schematic diagram of a screen projection use case provided for this application;

[0044] Fig.13 A schematic diagram of a specific use case of screen projection provided in this application;

[0045] Fig.14 A schematic diagram of the architecture of a screen projection system provided for this application;

[0046] Fig.15 A flowchart of an example of a screen projection method provided in this application;

[0047] Fig.16 A complete flowchart of a screen projection method provided in this application;

[0048] Fig.17 A schematic diagram of the structure of a screen projection device provided in this application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the following embodiments of the present application.

[0050] First, concepts related to the embodiments of the present application are explained.

[0051] 1) Application (application, app) is a software program that can realize one or more specific functions. The application in this embodiment refers to a software program that can provide a user interface. Usually, multiple applications can be installed in an electronic device. For example, camera applications, text messaging applications, image applications, various mailbox applications, instant messaging software or video applications, etc. The applications mentioned below can be applications that are installed on the electronic device when it leaves the factory, or they can be applications that the user downloads from the Internet or obtains from other electronic devices during the use of the electronic device (for example, applications sent by other electronic devices).

[0052] 2) Virtual display (VD) is a system component created in the operating system of an electronic device for screen recording and other related functions. The user interface of the application can be run on this system component without being displayed to the user. Developers can control the creation and destruction of VD through the operating system interface, where the operating system provides system capabilities such as VD creation, destruction, screen recording, and mapping. Among them, the developer is the developer of the operating system. In the embodiment of the present application, virtual screen is a Chinese interpretation of virtual display, and virtual display can also be interpreted as virtual display, which is not limited here.

[0053] In some examples, developers can set trigger conditions for VD creation, destruction, screen recording, and mapping through the operating system interface. For example, when a user triggers a screen projection operation on an electronic device, the electronic device can create a system component as a virtual screen in response to the screen projection operation triggered by the user. When the user ends the screen projection operation, the electronic device can destroy the virtual screen.

[0054] After creating a virtual screen, the electronic device can generate a user interface for the application on the virtual screen. The user interface exists in code form, and the virtual screen cannot display the user interface to the user. For example, when the electronic device projects the user interface on the virtual screen to another electronic device, the electronic device will identify the virtual screen as a system component as a screen that displays the user interface during the projection process. The user interface on the virtual screen will not be displayed to the user.

[0055] 3) Display manager service (DMS), which is used for display management and is responsible for the management of display devices within the system, including the management of all local screens (i.e. all display screens of electronic devices) and virtual screens.

[0056] 4) Activity manager service (AMS), used for task operation management.

[0057] 5) Window manager service (WMS), which is used for window management, specifically for calculating the position, size, and hierarchical relationship of each application's layer in the entire layer stack.

[0058] 6) Heterogeneous screen projection refers to an electronic device projecting the user interface of an application loaded on it to another electronic device for display.

[0059] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0060] Furthermore, unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the size, content, order, timing, priority or importance of multiple objects. For example, the second file and the second file are only used to distinguish different files, and do not indicate the difference in size, content, priority or importance of the two files.

[0061] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0062] Figure 1 A schematic diagram of the architecture of a screen projection system applicable to the method provided in an embodiment of the present application. Specifically, the screen projection system includes a first electronic device 10 and a second electronic device 20. The first electronic device 10 and the second electronic device 20 can communicate with each other through a communication network.

[0063] The communication network may be a local area network or a wide area network transferred by a relay device. When the communication network is a local area network, exemplarily, the communication network may be a short-distance communication network such as a Wi-Fi hotspot network, a Wi-Fi direct network, a Bluetooth network, a Zigbee network, or a near field communication (NFC) network. When the communication network is a wide area network, exemplarily, the communication network may be a third-generation wireless telephone technology (3G) network, a fourth-generation mobile communication technology (4G) network, a fifth-generation mobile communication technology (5G) network, a future-evolved public land mobile network (PLMN) or the Internet.

[0064] Among them, the first electronic device 10 refers to a device that actively shares the system interface or the application interface, that is, the screen projection electronic device. Exemplarily, the first electronic device 10 can be a mobile phone, a tablet computer, a laptop computer, a car device, etc. The second electronic device 20 refers to a device that passively receives the interface shared by the first electronic device 10, that is, the electronic device that displays the screen projection window. Exemplarily, the second electronic device 20 can be a mobile phone, a tablet computer, a laptop computer, etc.

[0065] In some embodiments, the screen projection system can be a multi-screen viewing system, the first electronic device 10 can be a main device, and the second electronic device 20 can be a secondary device.

[0066] Figure 2 A possible hardware structure diagram of an electronic device is shown. The electronic device 100 may be Figure 1 The first electronic device 10 in the embodiment may also be Figure 1 The second electronic device 20 in the embodiment. Figure 2As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0067] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a microcontroller unit (MCU), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The memory may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.

[0068] In the embodiment of the present application, the processor 110 can save one or more applications, and in response to the user's screen projection operation on the application, project the user interface of the application to the projected electronic device, and display the user interface on the display screen 194. In addition, the processor 110 can also display the user interface on the display screen 194 according to the projection data.

[0069] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.

[0070] The wireless communication function of the electronic device 100 can be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna of a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0071] The display screen 194 is used to display images, videos, etc. The display screen 194 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 or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. In an embodiment of the present application, the display screen 194 can be used to display a main interface, a user interface, a granularity adjustment control, etc.

[0072] The camera 193 is used to capture still images or videos. The camera 193 may include a front camera and a rear camera.

[0073] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and software code of at least one application (such as Huawei Video, Changlian, etc.). The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0074] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing files such as pictures and videos in the external memory card.

[0075] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0076] Understandably, Figure 2 The components shown do not constitute a specific limitation on the electronic device, and the electronic device may also include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. Figure 2 The electronic device 100 shown is taken as an example for introduction.

[0077] based on Figure 1 The projection system shown and Figure 2 The electronic device shown in the figure, the present application exemplarily provides a multi-screen viewing scenario, such as Figure 3 As shown. Among them, the first electronic device 10 can be specifically a car machine device 31, and the second electronic device 20 can be specifically a tablet device 32. Exemplarily, the user can select the application to be shared on the car machine central control screen of the car machine device 31, trigger the screen projection operation to project the application to the tablet device 32. In response to the screen projection operation triggered by the user, the car machine device 31 projects the application to the tablet device 32. However, the screen projection interface of the application is only displayed on the tablet device 32, and will not be displayed on the car machine central control screen of the car machine device 31, which affects the user experience.

[0078] Based on the above problems, the present application provides a screen projection method to solve the problem that the projection interface is only displayed on the projected device during heterogeneous screen projection. In this method, the first electronic device can create a first virtual screen in response to the screen projection operation triggered by the user for the application, and generate the user interface of the application on the first virtual screen. The first electronic device sends the projection data of the user interface of the application generated on the first virtual screen to the second electronic device, and copies the user interface generated on the first virtual screen to the display screen of the first electronic device for display. In this way, multi-screen viewing of the second electronic device and the first electronic device can be achieved, thereby improving the user experience.

[0079] The screen projection method is described below based on specific embodiments.

[0080] Figure 4 A schematic diagram of a screen projection method provided in an embodiment of the present application. The process includes:

[0081] S401: The first electronic device creates a first virtual screen in response to a screen projection operation of a user on an application, and generates a user interface of the application on the first virtual screen.

[0082] The user can select the application to be projected in the multi-screen management interface of the first electronic device and trigger the projection operation. The projection operation can be a multi-screen viewing operation. After the first electronic device detects the projection operation triggered by the user for the application, it determines the user interface of the application displayed on the first electronic device and the second electronic device. The first electronic device can also project the application to the second electronic device in response to the projection operation triggered by the user, and copy the user interface to the display screen of the first electronic device for display.

[0083] The application is an application loaded on the first electronic device, and may be a video application or other applications, which is not limited here.

[0084] For example, Figure 5 As shown, the first electronic device is a vehicle device 31, and the second electronic device is an in-vehicle PAD (tablet) 32. The user can move the user interface displayed on the vehicle control screen of the vehicle device 31 to the vehicle-wide sharing area to complete the operation of sharing the application to the in-vehicle PAD. For example, Figure 6 As shown, the vehicle central control screen displays a user interface and a vehicle-wide sharing area. The user can click on the user interface displayed on the vehicle central control screen and drag it to the vehicle-wide sharing area for sharing. In response to the application sharing operation triggered by the user, the vehicle device 31 creates a first virtual screen and generates a user interface of the application on the first virtual screen. The vehicle device 31 can send the user interface generated on the first virtual screen to the PAD 32 in the vehicle. In addition, the vehicle device 31 can also copy the user interface generated on the first virtual screen to the display screen of the vehicle device 31 for display.

[0085] In some examples, the display screen of the first electronic device may further display multiple screen areas, wherein each screen area corresponds to a screen of an electronic device. Figure 7 As shown, the display screen of the first electronic device can display four screen areas and the user interface of the application. Screen area 1 corresponds to electronic device 1, screen area 2 corresponds to electronic device 2, screen area 3 corresponds to electronic device 3, and screen area 4 corresponds to electronic device 4. The user can drag the user interface to the corresponding screen area to achieve the purpose of projecting the user interface to the screen of the electronic device corresponding to the screen area. Figure 8 As shown, the user can drag the user interface to the screen area 1 to realize the purpose of projecting the user interface to the electronic device 1. In response to the projection operation triggered by the user, the first electronic device projects the user interface to the electronic device 1 for display while displaying the user interface on the first electronic device. Exemplarily, the first electronic device may be a vehicle device 31, and the electronic devices 1, 2, 3, and 4 may be in-vehicle PADs 32.

[0086] In some embodiments, Fig. 9 As shown, the operating system of the first electronic device may include a multi-screen management module, a multi-screen viewing module and a screen projection module. Among them, the first electronic device can use the multi-screen management module, the multi-screen viewing module and the screen projection module to achieve the purpose of synchronously displaying the user interface of the screen projection application on the second electronic device and the first electronic device. The specific process is as follows:

[0087] After detecting the screen projection operation triggered by the user, the multi-screen management module of the first electronic device determines the second electronic device that displays the user interface of the application synchronously with the first electronic device, and sends a co-viewing instruction to the multi-screen co-viewing module. The co-viewing instruction is used to instruct the first electronic device and the second electronic device to display the user interface of the application at the same time. The co-viewing instruction may include the application being projected, and the device information of the second electronic device being projected. After receiving the co-viewing instruction, the multi-screen co-viewing module can initiate a heterogeneous screen projection process to the screen projection module, and the screen projection module responds to the screen projection operation triggered by the user, creates a first virtual screen, and generates the user interface of the application on the first virtual screen.

[0088] The screen projection module of the first electronic device may create the first virtual screen in the following manner:

[0089] After receiving the heterogeneous screen projection instruction initiated by the multi-screen viewing module, the screen projection module can respond to the screen projection operation and create a VD according to the screen parameters of the display screen of the first electronic device. The screen parameters include but are not limited to: the physical resolution of the display screen, the screen density, and the horizontal and vertical directions of the screen. Exemplarily, the screen projection module of the first electronic device can create a VD through the display manager service (DMS).

[0090] When creating the first virtual screen, the first electronic device may also create identification information of the first virtual screen. The first electronic device may also establish a mapping relationship between the identification information and the application, so that the first electronic device can subsequently determine a virtual screen for generating a user interface of the application according to the identification information.

[0091] The first electronic device may also move the application to the first virtual screen and run the application on the first virtual screen.

[0092] After creating the first virtual screen, the first electronic device moves the application from the display screen of the first electronic device to the first virtual screen, and generates a user interface of the application on the first virtual screen. Exemplarily, the screen projection module of the first electronic device can move the application to the first virtual screen through the AMS.

[0093] like Fig.10As shown, an embodiment of the present application provides a schematic diagram of a screen projection scenario. In response to a user's screen projection operation on an application, the first electronic device creates a first virtual screen, moves the application to the first virtual screen, and generates a user interface of the application on the first virtual screen. Fig.10 As shown, the first virtual screen displays a user interface of the application, wherein the user interface displayed in the first virtual screen will not be displayed on the display screen of the first electronic device.

[0094] S402: The first electronic device sends screen projection data to the second electronic device, wherein the screen projection data includes a user interface of an application generated on the first virtual screen.

[0095] In some embodiments, the first electronic device may synthesize and encode the user interface generated on the first virtual screen to obtain projection data.

[0096] The first electronic device may obtain layer data of the user interface generated on the first screen, and perform layer synthesis on the layer data to obtain image data of the user interface.

[0097] The first electronic device may also encode the image data to obtain projection data, wherein the projection data is used by the second electronic device to display the user interface of the application in the projection window. Exemplarily, the projection data may be a video stream.

[0098] The first electronic device can send the projection data to the second electronic device through the network, so that the second electronic device displays the user interface of the application in the projection window according to the received projection data.

[0099] Continue with Fig. 9 For example, the projection module of the first electronic device can obtain the layer data of the user interface generated on the first virtual screen, and synthesize the layer data. The projection module of the first electronic device can also encode the image data to obtain the projection data. The projection module of the first electronic device can also transmit the projection data to the second electronic device through the network. Fig.11 As shown, the second electronic device may include a screen projection module and a screen projection player. The second electronic device may receive the projection data sent by the screen projection module of the first electronic device through the screen projection module. In addition, the screen projection module of the second electronic device may decode the projection data to obtain image data. The screen projection module of the second electronic device may send the image data to the screen projection player, and the screen projection player displays the user interface of the application in the screen projection window according to the received image data.

[0100] In some examples, after creating the first virtual screen, the projection module of the first electronic device can establish a connection with the projection module of the second electronic device. After the projection module of the second electronic device establishes a connection with the projection module of the first electronic device, a projection window can be created through the projection player of the second electronic device. After receiving the projection data, the projection module of the second electronic device can inject the received projection data into the surfaceview of the projection window. The projection player of the second electronic device displays the user interface in the projection window.

[0101] S403: The first electronic device copies the user interface generated on the first virtual screen to a display screen of the first electronic device for display.

[0102] In some embodiments, the first electronic device may display the user interface on the display screen through the following steps:

[0103] A1: The first electronic device creates a native window, wherein the native window is used to display a user interface of an application on a display screen of the first electronic device.

[0104] After creating the first virtual screen, the screen projection module of the first electronic device can also send identification information of the first virtual screen to the multi-screen viewing module.

[0105] After receiving the identification information of the first virtual screen, the multi-screen viewing module can determine the first virtual screen for generating the user interface of the application according to the mapping relationship between the identification information of the first virtual screen and the application.

[0106] Optionally, after receiving the identification information of the first virtual screen used to generate the user interface of the application, the multi-screen viewing module creates a native window that displays the user interface of the application on the display screen of the first electronic device. That is, the multi-screen viewing module establishes a binding relationship between the identification information of the first virtual screen and the created native window.

[0107] A2: The first electronic device copies the user interface generated on the first virtual screen to the native window, and displays the user interface in the native window.

[0108] In some embodiments, the first electronic device may perform layer copying on the user interface generated on the first virtual screen to obtain layer data of the user interface.

[0109] The multi-screen co-viewing module of the first electronic device can determine the identification information of the first virtual screen that has a mapping relationship with the application that needs to be projected; according to the identification information of the first virtual screen, the layer of the user interface generated on the first virtual screen is copied to obtain the layer data of the user interface. The identification information includes the ID of the first virtual screen.

[0110] The multi-screen viewing module can also copy the acquired layer data to the surfaceview of the native window and display the user interface of the application in the native window.

[0111] The multi-screen viewing module of the first electronic device can also perform layer synthesis on the layer data to obtain image data. The multi-screen viewing module of the first electronic device can display the user interface in a native window according to the image data.

[0112] In the embodiment of the present application, steps S402 and S403 are executed in no particular order, and the first electronic device can realize multi-screen simultaneous viewing of the first electronic device and the second electronic device by executing steps S402 and S403 simultaneously.

[0113] When the first electronic device and the second electronic device are displaying the user interface, the first electronic device can pause updating the user interface. That is, the user interface displayed by the first electronic device and the second electronic device is the user interface of the application when the user triggers the screen projection operation. The user can operate the user interface on the display screen of the first electronic device to update the user interface of the application. In addition, the user can also operate the user interface on the display screen of the second electronic device to update the user interface of the application. In this way, the first electronic device will generate a new user interface on the first virtual screen, copy the updated user interface to the display screen of the first electronic device for display, and project the updated user interface to the second electronic device for display. For example, the application is a video application with Figure 5 For example, when a user shares a video application to the in-car PAD, the in-car central control screen 31 projects the video application to the in-car PAD, and the in-car PAD displays the user interface of the video application in the projection window. The video user interface is displayed in the native window of the in-car central control screen 31. When the in-car central control screen 31 and the in-car PAD 32 display the user interface of the video application, the user interface of the video application is not played. The user can click on the user interface on the display screen of the in-car central control screen 31 or the in-car PAD 32 to play the video application. In this way, the in-car central control screen 31 and the in-car PAD 32 can play the user interface of the video application.

[0114] like Fig.10 As shown, the first electronic device can copy the user interface generated on the first virtual screen and display it on the display screen of the first electronic device. At the same time, the first electronic device can also send the projection data of the user interface generated on the first virtual screen to the second electronic device. In this way, the first electronic device can synchronously display the projected user interface locally when performing heterogeneous screen projection. Among them, the user interface on the first virtual display screen will not be actually displayed.

[0115] In the embodiment of the present application, although the second electronic device displays the user interface slower than the first electronic device, the playback delay between the two is small (for example, less than 75ms), and the time difference is within a reasonable range, meeting the standard for simultaneous viewing. Therefore, it can be considered that the screen projection method provided in the embodiment of the present application can achieve the requirement of the first electronic device and the second electronic device playing the user interface at the same time. In this way, in the embodiment of the present application, when the first electronic device projects the application to the second electronic device, the first electronic device and the second electronic device display the user interface of the application at the same time, solving the problem that heterogeneous screen projection cannot be displayed locally.

[0116] In some embodiments, the first electronic device may further include multiple display screens, display screen 1, ..., display screen N. The first electronic device creates a first virtual screen in response to a screen projection operation triggered by a user for an application. Fig.12 As shown, the first electronic device moves the application stack to the first virtual screen, and generates a user interface of the application on the first virtual screen. The first electronic device sends the user interface code generated on the first virtual screen to the second electronic device, and displays the user interface of the application on the display screen of the second electronic device. At the same time, the first electronic device can also copy the user interface generated on the first virtual screen to the display screen 1, ..., display screen N of the first electronic device for display. In this way, display screen 1, ..., display screen N and the display screen of the second electronic device can synchronously display the user interface of the application. Among them, the user interface in the first virtual screen will not be actually displayed.

[0117] For example, the first electronic device may be a vehicle-mounted device, and the display screen of the vehicle-mounted device includes a vehicle-mounted central control screen and a vehicle-mounted co-pilot screen. The second electronic device may be an in-vehicle PAD. Fig.13 As shown, the vehicle-mounted device can create a first virtual screen in response to a multi-screen viewing operation triggered by the user, and move the application from the vehicle-mounted central control screen to the first virtual screen, run the application on the first virtual screen, and generate a user interface for the application. The vehicle-mounted device can encode the user interface generated on the first virtual screen and send it to the in-vehicle PAD for display, and the user interface is displayed on the display screen of the in-vehicle PAD. At the same time, the vehicle-mounted device can also copy the user interface generated on the first virtual screen to the vehicle-mounted central control screen and the vehicle-mounted co-pilot screen for display. In this way, the vehicle-mounted central control screen, the vehicle-mounted co-pilot screen and the in-vehicle PAD can display the user interface synchronously to achieve multi-screen viewing. Among them, the user interface in the first virtual screen will not be actually displayed.

[0118] In some embodiments, the user can also share the application of the first electronic device with multiple second electronic devices to achieve multi-screen viewing. The first electronic device obtains the layer data of the user interface of the application generated on the first virtual screen, and performs layer synthesis on the layer data to obtain image data. The first electronic device can copy the image data to the display screen of the first electronic device for display. At the same time, the first electronic device can also encode the image data to obtain projection data, and send the projection data to multiple second electronic devices through the network. Each second electronic device among the multiple second electronic devices can decode the received projection data to obtain image data. In addition, each second electronic device can also display the user interface in the projection window based on the image data.

[0119] Based on the contents described in the above embodiments, an embodiment of the present application provides a possible screen projection system. Fig.14 A schematic diagram of the architecture of a screen projection system provided for an embodiment of the present application. The system includes a first electronic device and a second electronic device, wherein the first electronic device and the second electronic device are located in a distributed multi-device environment. A communication link can be established between the first electronic device and the second electronic device via wireless or wired means to form a distributed multi-device environment. For example, the first electronic device and the second electronic device can establish a Bluetooth link via Bluetooth, or establish a Wi-Fi communication link via Wi-Fi, and can also establish a connection via a wired link.

[0120] The operating system of the first electronic device may include a multi-screen management module, a multi-screen viewing module, and a screen projection module. The second electronic device may include a screen projection module and a screen projection player.

[0121] In some embodiments, the first electronic device and the second electronic device can transmit screen projection data through the screen projection module to form a screen projection system in a multi-device environment.

[0122] like Fig.14 As shown, the multi-screen management module of the first electronic device detects the multi-screen co-viewing operation triggered by the user, and determines the application and the second electronic device for multi-screen co-viewing. The multi-screen management module initiates an instruction to the multi-screen co-viewing module to view with the second electronic device, and the multi-screen co-viewing module initiates heterogeneous screen projection through the screen projection module according to the instruction sent by the multi-screen management module. When the multi-screen co-viewing module initiates heterogeneous screen projection, the screen projection module can respond to the screen projection operation, control the DMS to create a VD, and move the application stack to the VD through the AMS. Among them, the first electronic device generates a user interface for the application on the VD. The screen projection module in the first electronic device returns the identification information of the created VD to the multi-screen co-viewing module. After returning the identification information of the VD to the multi-screen co-viewing module, the screen projection module of the first electronic device can also establish a WIFI connection with the second electronic device through the WIFI module.

[0123] After the second electronic device establishes a connection with the first electronic device, the screen projection module of the second electronic device starts the screen projection player. After the screen projection player is started, a screen projection window is created. The screen projection window is used to display the user interface of the first electronic device projected to the second electronic device.

[0124] The projection module of the first electronic device obtains the layer data applied on the VD through the DMS, and performs layer synthesis on the layer data to obtain image data. The projection module of the first electronic device encodes the image data to obtain projection data. The projection module of the first electronic device transmits the projection data to the projection module of the second electronic device through a WIFI connection. The projection module of the second electronic device decodes the projection data to obtain image data. The second electronic device sends the image data to the projection player, and the projection player displays the user interface in the projection window of the display screen of the second electronic device.

[0125] After receiving the identification information, the multi-screen viewing module of the first electronic device can create a native window, wherein the native window is used to display the user interface on the display screen of the first electronic device. The multi-screen viewing module can perform layer copying on the user interface generated on the VD according to the identification information to obtain the image data of the user interface. The multi-screen viewing module can also copy the obtained layer data to the surfaceview of the native window. The multi-screen viewing module can also perform layer synthesis on the layer data to obtain image data, and display the user interface in the native window based on the image data.

[0126] Fig.15 An example of a screen projection method provided in an embodiment of the present application, wherein the example includes the following steps.

[0127] S1501: A user may select an application in the multi-screen management interface of the first electronic device and initiate multi-screen viewing.

[0128] S1502: The multi-screen management module of the first electronic device may initiate multi-screen co-viewing through the multi-screen co-viewing module in response to a multi-screen co-viewing operation initiated by the user.

[0129] S1503: The multi-screen viewing module of the first electronic device initiates heterogeneous screen projection through the screen projection module of the first electronic device.

[0130] S1504: The screen projection module of the first electronic device can create a VD through the DSM in response to the screen projection operation.

[0131] S1505: The screen projection module of the first electronic device may move the application stack to the VD through the AMS, and generate a user interface of the application on the VD.

[0132] S1506: The screen projection module of the first electronic device establishes a connection with the screen projection module of the second electronic device.

[0133] S1507: The screen projection module of the second electronic device starts the screen projection player.

[0134] S1508: The screen projection player creates a screen projection window.

[0135] The screen projection module of the second electronic device creates a surfaceview of the screen projection window.

[0136] S1509: The screen projection module of the first electronic device obtains the layer data of the user interface generated on the VD.

[0137] Among them, step S1507 and step S1509 are performed in no particular order.

[0138] S1510: The screen projection module of the first electronic device performs image synthesis on the layer data to obtain image data.

[0139] S1511: The screen projection module of the first electronic device encodes the image data to obtain screen projection data.

[0140] S1512: The screen projection module of the first electronic device can transmit the screen projection data to the screen projection module of the second electronic device.

[0141] S1513: The screen projection module of the second electronic device decodes the screen projection data to obtain image data.

[0142] S1514: The screen projection module of the second electronic device sends the image data to the screen projection player of the second electronic device.

[0143] S1515: The projection player of the second electronic device displays the user interface of the application in the projection window according to the image data.

[0144] After executing step S1505, the first electronic device may further execute step S1516, that is, step S1516 and step S1506 are not performed in any particular order.

[0145] S1516: The screen projection module of the first electronic device returns the identification information of the VD to the multi-screen viewing module.

[0146] After creating the VD, the projection module of the first electronic device can also generate identification information of the VD. The first electronic device can also establish a mapping relationship between the identification information of the VD and the application.

[0147] S1517: After receiving the identification information of the VD, the multi-screen viewing module of the first electronic device creates a native window, wherein the native window is used to display a user interface on the display screen of the first electronic device.

[0148] S1518: The multi-screen viewing module of the first electronic device copies the layer of the user interface generated on the VD through the WMS according to the identification information to obtain the layer data of the user interface.

[0149] In some embodiments, the multi-screen viewing module of the first electronic device determines the VD for generating the user interface of the application according to the mapping relationship between the identification information and the application. The multi-screen viewing module performs layer replication on the user interface generated on the VD through the WMS to obtain the layer data of the user interface.

[0150] S1519: The multi-screen viewing module of the first electronic device may also copy the obtained layer data to the native window.

[0151] Exemplarily, the multi-screen viewing module of the first electronic device may also copy the obtained layer data to the surfaceview of the native window.

[0152] S1520: The multi-screen viewing module of the first electronic device may perform layer synthesis on the layer data to obtain image data.

[0153] S1521: The multi-screen viewing module of the first electronic device can also display the user interface of the application in the native window according to the obtained image data.

[0154] based on Fig.15 According to the content shown, the multi-screen management module of the first electronic device can determine the first electronic device and the second electronic device that display the user interface of the application. The multi-screen viewing module of the first electronic device can copy the user interface generated on the VD to the display screen of the first electronic device for display. And the screen projection module of the first electronic device can create a VD to realize heterogeneous screen projection to the second electronic device. Moreover, in the process of completing heterogeneous screen projection and layer copying, the first electronic device only creates one VD, which reduces the power consumption of multi-screen viewing while realizing multi-screen viewing.

[0155] Fig.16 A complete flow chart of a screen projection method is provided for this application. Fig.16 As shown, the method comprises the following steps:

[0156] S1601: The user selects an application on the display screen of the first electronic device to initiate a screen projection operation.

[0157] S1602: After detecting a user's screen projection operation on an application, the first electronic device determines that the first electronic device and the second electronic device display a user interface of the application.

[0158] S1603: The first electronic device creates a first virtual screen according to screen parameters of the display screen of the first electronic device in response to the user's screen projection operation on the application.

[0159] S1604: The first electronic device generates a user interface of the application on the first virtual screen.

[0160] Exemplarily, after creating the first virtual screen, the first electronic device moves the application stack to the first virtual screen and generates a user interface on the first virtual screen.

[0161] S1605: The first electronic device generates identification information of the first virtual screen.

[0162] S1606: The first electronic device establishes a mapping relationship between the identification information of the first virtual screen and the application.

[0163] S1607: The first electronic device obtains layer data of the user interface generated on the first virtual screen.

[0164] S1608: The first electronic device performs layer synthesis on the layer data to obtain image data.

[0165] S1609: The first electronic device encodes the image data to obtain projection data.

[0166] The projection data is used by the second electronic device to display the user interface of the application in the projection window.

[0167] S1610: The first electronic device sends the screen projection data to the second electronic device.

[0168] In some embodiments, after creating the first virtual screen, the first electronic device establishes a connection with the second electronic device. The second electronic device creates a projection window on the display screen to display the user interface.

[0169] S1611: The second electronic device displays the user interface of the application in the projection window according to the projection data.

[0170] S1612: The first electronic device creates a native window.

[0171] The native window is used to display the user interface of the application on the display screen of the first electronic device.

[0172] There is no particular order in which step S1607 and step S1612 are executed.

[0173] S1613: The first electronic device determines, according to the mapping relationship, a first virtual screen for generating a user interface of the application.

[0174] S1614: The first electronic device performs layer replication on the user interface generated on the first virtual screen to obtain layer data of the user interface.

[0175] S1615: The first electronic device performs layer synthesis on the layer data to obtain image data.

[0176] S1616: The first electronic device displays a user interface in a native window according to the image data.

[0177] based on Fig.16 As shown in the content, the first electronic device creates a first virtual screen and generates a user interface of the projected application on the first virtual screen. When the first electronic device synthesizes and encodes the user interface on the first virtual screen and sends it to the second electronic device for display, it can also copy the user interface on the first virtual screen to the display screen of the first electronic device for display. In this way, the first electronic device and the second electronic device can be viewed on multiple screens at the same time, and the power consumption of viewing on multiple screens is reduced.

[0178] Based on the above content and the same idea, Fig.17 A structural schematic diagram of a possible screen projection device 1700 provided in the present application, wherein the screen projection device 1700 is applied to a screen projection system consisting of a first electronic device and a second electronic device.

[0179] In some embodiments, the first electronic device includes the screen projection device 1700, or the first electronic device is the screen projection device 1700. The screen projection device 1700 can be used to implement the functions of the first electronic device in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment.

[0180] Display screen 1701, used to display a user interface;

[0181] Communication unit 1702, used for receiving and sending data;

[0182] Processing unit 1703 is used to create a first virtual screen in response to a user's screen projection operation on an application, and generate a user interface of the application on the first virtual screen; send projection data to a second electronic device; the projection data includes the user interface of the application generated on the first virtual screen; and copy the user interface generated on the first virtual screen to display on the display screen 1701 of the first electronic device.

[0183] In an optional implementation manner, the processing unit 1703 is specifically configured to:

[0184] In response to the screen projection operation, a first virtual screen is created according to the screen parameters of the display screen 1701 of the first electronic device.

[0185] In an optional implementation manner, the processing unit 1703 is further configured to:

[0186] Generate identification information of the first virtual screen;

[0187] A mapping relationship between the identification information of the first virtual screen and the application is established.

[0188] In an optional implementation manner, the processing unit 1703 is specifically configured to:

[0189] Generate screen projection data according to the user interface generated on the first virtual screen; the screen projection data is used for the second electronic device to display the user interface of the application in the screen projection window;

[0190] The screen projection data is sent to the second electronic device.

[0191] In an optional implementation manner, the processing unit 1703 is specifically configured to:

[0192] Acquire layer data of the user interface generated on the first virtual screen;

[0193] Perform layer synthesis on the layer data to obtain image data;

[0194] . Encode the image data to get the projection data

[0195] In an optional implementation manner, the processing unit 1703 is specifically configured to:

[0196] Creating a native window, where the native window is used to display a user interface of the application on the display screen 1701 of the first electronic device;

[0197] The user interface generated on the first virtual screen is copied to the native window, and the user interface is displayed in the native window.

[0198] In an optional implementation, after creating the native window, the processing unit 1703 is further configured to:

[0199] According to the mapping relationship between the identification information of the first virtual screen and the application, a first virtual screen for generating a user interface of the application is determined.

[0200] In an optional implementation manner, the processing unit 1703 is specifically configured to:

[0201] Performing layer copying on the user interface generated on the first virtual screen to obtain layer data of the user interface;

[0202] Perform layer synthesis on the layer data to obtain image data;

[0203] Displays the user interface in a native window based on the image data.

[0204] In an optional implementation manner, the processing unit 1703 is further configured to:

[0205] After detecting a screen projection operation triggered by a user on an application, determining that the first electronic device and the second electronic device display a user interface of the application.

[0206] Based on the above content and the same concept, the present application provides an electronic device, including a display screen, a processor and a memory, the display screen is used to display a user interface, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the steps performed by the first electronic device in the above method embodiment.

[0207] Based on the above content and the same concept, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computing device, the computing device executes the steps performed by the first electronic device in the above method embodiment.

[0208] Based on the above content and the same concept, the present application provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a computing device, the computing device executes the steps performed by the first electronic device in the above method embodiment.

[0209] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

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

[0211] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0212] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0213] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A screen projection method, applied to a screen projection system, wherein the screen projection system includes the first electronic device and the second electronic device, characterized in that: The method comprises: The first electronic device creates a first virtual screen in response to a screen projection operation of the user on the application, and generates a user interface of the application on the first virtual screen; The first electronic device sends screen projection data to the second electronic device; the screen projection data includes a user interface of the application generated on the first virtual screen; The first electronic device copies the user interface generated on the first virtual screen to a display screen of the first electronic device for display.

2. The method according to claim 1, characterized in that: The first electronic device creates a first virtual screen in response to a screen projection operation for an application, including: The first electronic device creates the first virtual screen according to screen parameters of the display screen of the first electronic device in response to the screen projection operation.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: The first electronic device generates identification information of the first virtual screen; The first electronic device establishes a mapping relationship between the identification information of the first virtual screen and the application.

4. The method according to any one of claims 1 to 3, characterized in that: The first electronic device sending the screen projection data to the second electronic device includes: The first electronic device generates the screen projection data according to the user interface generated on the first virtual screen; the screen projection data is used by the second electronic device to display the user interface of the application in the screen projection window; The first electronic device sends the screen projection data to the second electronic device.

5. The method according to claim 4, characterized in that The first electronic device generates the screen projection data according to the user interface generated on the first virtual screen, including: The first electronic device acquires layer data of a user interface generated on the first virtual screen; The first electronic device performs layer synthesis on the layer data to obtain image data; The first electronic device encodes the image data to obtain the projection data.

6. The method according to any one of claims 1 to 5, characterized in that: The first electronic device copies the user interface generated on the first virtual screen to a display screen of the first electronic device for display, including: The first electronic device creates a native window, where the native window is used to display a user interface of the application on a display screen of the first electronic device; The first electronic device copies the user interface generated on the first virtual screen to the native window, and displays the user interface in the native window.

7. The method according to claim 6, characterized in that After the first electronic device creates a native window, the method further includes: The first electronic device determines, according to a mapping relationship between the identification information of the first virtual screen and the application, a first virtual screen for generating a user interface of the application.

8. The method according to claim 7, characterized in that The first electronic device copies the user interface generated on the first virtual screen to the native window, and displays the user interface in the native window, including: The first electronic device performs layer replication on the user interface generated on the first virtual screen to obtain layer data of the user interface; The first electronic device performs layer synthesis on the layer data to obtain the image data; The first electronic device displays the user interface in the native window according to the image data.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: After detecting the screen projection operation triggered by the user for the application, the first electronic device determines that the first electronic device and the second electronic device display the user interface of the application.

10. A screen projection device, applied to a first electronic device in a screen projection system, characterized in that: The device comprises: A display screen, used for displaying a user interface; A communication unit for receiving and sending data; A processing unit, configured to create a first virtual screen in response to a user's screen projection operation for an application, and generate a user interface of the application on the first virtual screen; send projection data to the second electronic device; the projection data includes the user interface of the application generated on the first virtual screen; and copy the user interface generated on the first virtual screen to a display screen of the first electronic device for display.

11. The device according to claim 10, characterized in that The processing unit is specifically used for: In response to the screen projection operation, the first virtual screen is created according to screen parameters of the display screen of the first electronic device.

12. The device according to claim 10 or 11, characterized in that The processing unit is also used for: generating identification information of the first virtual screen; A mapping relationship between the identification information of the first virtual screen and the application is established.

13. The device according to any one of claims 10 to 12, characterized in that: The processing unit is specifically used for: Generate the projection data according to the user interface generated on the first virtual screen; the projection data is used for the second electronic device to display the user interface of the application in the projection window; The screen projection data is sent to the second electronic device.

14. The device according to claim 13, characterized in that The processing unit is specifically used for: Acquire layer data of a user interface generated on the first virtual screen; Performing layer synthesis on the layer data to obtain image data; The image data is encoded to obtain the projection data.

15. The device according to any one of claims 10 to 14, characterized in that: The processing unit is specifically used for: Creating a native window, where the native window is used to display a user interface of the application on a display screen of the first electronic device; The user interface generated on the first virtual screen is copied to the native window, and the user interface is displayed in the native window.

16. The device according to claim 15, characterized in that After creating the native window, the processing unit is further configured to: A first virtual screen for generating a user interface of the application is determined according to a mapping relationship between the identification information of the first virtual screen and the application.

17. The device according to claim 16, characterized in that The processing unit is specifically used for: Performing layer replication on the user interface generated on the first virtual screen to obtain layer data of the user interface; Performing layer synthesis on the layer data to obtain the image data; The user interface is displayed in the native window according to the image data.

18. The device according to any one of claims 10 to 17, characterized in that: The processing unit is also used for: After detecting that the screen projection operation triggered by the user for the application is detected, determining that the first electronic device and the second electronic device display the user interface of the application.

19. An electronic device, characterized in that: include: Display screen; one or more processors; one or more memories; The display screen is used to display a user interface; The one or more memories are used to store one or more computer programs and data information; wherein the one or more computer programs include instructions; When the instructions are executed by the one or more processors, the electronic device executes the method according to any one of claims 1 to 9.

20. A chip, characterized in that: The chip is coupled to a memory in an electronic device, so that the chip calls a computer program stored in the memory when running to implement the method according to any one of claims 1 to 9.

21. A computer storage medium, characterized in that The computer-readable storage medium comprises a computer program, and when the computer program is executed on the electronic device, the electronic device causes the method according to any one of claims 1 to 9 to be performed.

22. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Screen projection method and device and electronic equipment

    CN111443884A

  • Collaborative display method, terminal equipment and computer readable storage medium

    CN114756184A

  • Response method of screen projection end and display end, electronic equipment and storage medium

    CN115729502A

Cited By

  • Virtualized screen projection method, hardware equipment for virtualized screen projection and storage medium

    CN120406884A

  • Virtualized screen projection method, virtualized screen projection hardware device and storage medium

    CN120406884B

  • Screen mirroring method and apparatus, and electronic device

    EP4742027A1

  • Screen mirroring method and apparatus, and electronic device

    WO2025060543A1