Screen projection method and device, electronic equipment and storage medium
Through the screen projection method in the smart cockpit system, the screen stream mapping is achieved using ProjectionManager and Projection objects, which solves the problem that non-audio and video applications need to develop screen projection separately, realizes multi-screen shared display, and improves the user experience.
Patent Information
- Application Number
- CN202510456303.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, non-audio and video application software in the smart cockpit system needs to develop a screen projection function separately, resulting in a reduced user experience.
By introducing screen projection methods into applications in the smart cockpit system, a Projection object is created using the ProjectionManager instance, a target screen stream is generated, and a virtual screen maps the screen stream to the display screen of the secondary screen or the rear screen through the virtual screen to realize multi-screen shared display.
Without creating a screen projection feature for each application separately, all applications can share the display between the home screen and the secondary screen or the rear screen to improve the user experience.
Smart Images

Figure CN120406882A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicles, and in particular, to a screen mirroring method, a screen mirroring device, an electronic device, and a computer-readable storage medium. Background Art
[0002] Currently, with the development of Android intelligent terminals, especially Android intelligent cockpits, in addition to the central control screen, more and more vehicle models are beginning to provide a co-pilot screen and a rear-seat entertainment screen, and the demand for screen mirroring functions is increasing. Since the intelligent cockpit has evolved from the initial single central control screen to a dual-screen combination of the front-row central control and co-pilot, or a front-row dual-screen plus a rear-seat screen, there is a need for multiple screens to synchronously display the screen mirroring.
[0003] In the related art, for the audio and video application software in the intelligent cockpit, when the screen mirroring function needs to be used, each application needs to develop its own screen mirroring function; for the non-audio and video application software in the intelligent cockpit, that is, the software that does not include the screen mirroring function or the function of sharing the screen, in some special scenarios, the screen mirroring function may also need to be used, which will reduce the user experience. Summary of the Invention
[0004] The present invention aims to at least solve one of the technical problems in the related art to some extent. To this end, the first object of the present invention is to propose a screen mirroring method, which can enable the application programs in the intelligent cockpit system that require the screen mirroring function not to create their own screen mirroring functions individually, so that all application programs in the intelligent cockpit system can share the display between the main screen and the co-pilot screen or the rear-seat screen, improving the user experience.
[0005] The second object of the present invention is to propose a screen mirroring device.
[0006] The third object of the present invention is to propose an electronic device.
[0007] The fourth object of the present invention is to propose a computer-readable storage medium.
[0008] To achieve the above object, an embodiment of the first aspect of the present invention proposes a screen mirroring method, which is applied to a first device. The first device includes a display screen, and a graphical user interface is displayed on the display screen. The graphical user interface includes at least one first touch identifier; the method includes: in response to the first touch identifier being triggered, determining a second device corresponding to the first touch identifier; continuously capturing a target screen displayed on the display screen of the first device to generate a target screen stream; mapping the target screen stream to the display screen of the second device so that the target screen is displayed on the display screen of the second device.
[0009] In addition, the screen mirroring method according to the above embodiment of the present invention may further have the following additional technical features:
[0010] According to some embodiments of the present invention, the graphical user interface further includes a second touch identifier; the method further includes: in response to the second touch identifier being triggered, controlling to display a first touch identifier on the graphical user interface.
[0011] According to some embodiments of the present invention, the method further includes: retrieving an instance of ProjectionManager, creating a Projection object through the ProjectionManager instance, creating a virtual screen through the Projection object; controlling to create a Presentation component on the display screen of the second device, and creating a Surface display control within the Presentation component, and binding the Surface display control to the virtual screen.
[0012] According to some embodiments of the present invention, continuously capturing a target screen displayed on the display screen of the first device to generate a target screen stream, including: continuously obtaining a target data stream of the target screen displayed on the display screen of the first device through the Projection object, and obtaining a corresponding target screen stream on the virtual screen according to the target data stream.
[0013] According to some embodiments of the present invention, mapping the target screen stream to the display screen of the second device so that the display screen of the second device displays the target screen, including: mapping the target screen stream to the Surface control through the virtual screen so that the display screen of the second device displays the target screen.
[0014] According to some embodiments of the present invention, the method further includes: continuously monitoring the life cycle of an application program started on the first device; wherein, the application program corresponds to the target screen; in response to the life cycle changing, controlling to hide the Presentation component on the second device to hide the target screen displayed on the display screen of the second device.
[0015] According to some embodiments of the present invention, the graphical user interface further includes a third touch identifier; the method further includes: in response to the third touch identifier being triggered, controlling to hide the Presentation component on the second device to hide the target screen displayed on the display screen of the second device.
[0016] The screen mirroring method according to an embodiment of the present invention is applied to a first device. The first device includes a display screen, and a graphical user interface is displayed on the display screen. The graphical user interface includes at least one first touch identifier. The method includes: in response to the first touch identifier being triggered, determining a second device corresponding to the first touch identifier; continuously capturing a target screen displayed on the display screen of the first device to generate a target screen stream; and mapping the target screen stream to the display screen of the second device so that the target screen is displayed on the display screen of the second device. Thus, this method enables application programs that require the screen mirroring function in the intelligent cockpit system not to create their own screen mirroring functions individually, allowing all application programs in the intelligent cockpit system to share the display between the main screen and the secondary screen or the rear screen, improving the user experience.
[0017] The second object of the present invention is to propose a screen mirroring device, which enables application programs that require the screen mirroring function in the intelligent cockpit system not to create their own screen mirroring functions individually, allowing all application programs in the intelligent cockpit system to share the display between the main screen and the secondary screen or the rear screen, improving the user experience.
[0018] To achieve the above object, an embodiment of the second aspect of the present invention proposes a screen mirroring device, which is applied to a first device. The first device includes a display screen, and a graphical user interface is displayed on the display screen. The graphical user interface includes at least one first touch identifier. The device includes: a response module configured to determine a second device corresponding to the first touch identifier in response to the first touch identifier being triggered; a capture module configured to continuously capture a target screen displayed on the display screen of the first device to generate a target screen stream; and a screen mirroring module configured to map the target screen stream to the display screen of the second device so that the target screen is displayed on the display screen of the second device.
[0019] The screen mirroring device according to an embodiment of the present invention includes: a response module configured to determine a second device corresponding to the first touch identifier in response to the first touch identifier being triggered; a capture module configured to continuously capture a target screen displayed on the display screen of the first device to generate a target screen stream; and a screen mirroring module configured to map the target screen stream to the display screen of the second device so that the target screen is displayed on the display screen of the second device. Thus, this device enables application programs that require the screen mirroring function in the intelligent cockpit system not to create their own screen mirroring functions individually, allowing all application programs in the intelligent cockpit system to share the display between the main screen and the secondary screen or the rear screen, improving the user experience.
[0020] To achieve the above object, an embodiment of the third aspect of the present invention provides an electronic device, including: a display screen; one or more processors; one or more memories; the display screen is configured to display a graphical user interface; one or more memories are configured 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 is caused to execute the steps of the above screen mirroring method.
[0021] According to the electronic device of the embodiment of the present invention, by executing the above screen mirroring method, it is possible to enable application programs that require the screen mirroring function in the intelligent cockpit system not to create their own screen mirroring functions individually, so that all application programs in the intelligent cockpit system can be shared and displayed between the main screen and the secondary screen or the rear screen, improving the user experience.
[0022] To achieve the above object, an embodiment of the fourth aspect of the present invention provides a computer-readable storage medium, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the above screen mirroring method are implemented.
[0023] According to the computer-readable storage medium of the embodiment of the present invention, through the above screen mirroring method, it is possible to enable application programs that require the screen mirroring function in the intelligent cockpit system not to create their own screen mirroring functions individually, so that all application programs in the intelligent cockpit system can be shared and displayed between the main screen and the secondary screen or the rear screen, improving the user experience.
[0024] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. Description of the Drawings
[0025] Figure 1 It is a flowchart of a screen mirroring method according to some embodiments of the present invention;
[0026] Figure 2 It is a schematic diagram of a screen mirroring method according to some embodiments of the present invention;
[0027] Figure 3 It is a flowchart of a screen mirroring method according to other embodiments of the present invention;
[0028] Figure 4 It is a flowchart of a screen mirroring method according to still other embodiments of the present invention;
[0029] Figure 5 It is a schematic diagram of a screen mirroring device according to some embodiments of the present invention;
[0030] Figure 6 It is a block diagram of an electronic device according to some embodiments of the present invention. Detailed implementation manners
[0031] To make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to specific embodiments and the accompanying drawings.
[0032] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present invention should have the ordinary meanings understood by those of ordinary skill in the field to which the present invention pertains. The terms "first", "second", and similar terms used in the embodiments of the present invention do not denote any order, quantity, or importance, but are only used to distinguish different components. The terms such as "include" or "comprise" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. The terms such as "connect" or "couple" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left", "right", etc. are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0033] As described in the background art section, currently, with the development of Android intelligent terminals, especially Android intelligent cockpits, in addition to the central control screen, more and more vehicle models are starting to provide a co-pilot screen and a rear-seat entertainment screen, and the demand for screen mirroring functions is increasing. Since the intelligent cockpit has evolved from the initial single central control screen to a dual-screen configuration of the front-row central control and co-pilot, or a front-row dual-screen plus a rear-seat screen, there is a need for multiple screens to display screen mirroring synchronously.
[0034] The applicant found during the implementation of the present invention that in the related art, for audio-visual application software in the intelligent cockpit, when the screen mirroring function needs to be used, each application needs to develop the screen mirroring function; for non-audio-visual application software in the intelligent cockpit, that is, software that does not include the screen mirroring function or the shared screen function, in some special scenarios, the screen mirroring function may also need to be used, which will reduce the user experience.
[0035] Therefore, the present invention enables application programs in the intelligent cockpit system that require the screen mirroring function not to create their own screen mirroring functions individually, so that all application programs in the intelligent cockpit system can share the display between the main screen and the co-pilot screen or the rear-seat screen, improving the user experience.
[0036] Next, a screen mirroring method, a screen mirroring device, an electronic device, and a computer-readable storage medium proposed in the embodiments of the present invention will be described with reference to the accompanying drawings.
[0037] In some embodiments of the present invention, the screen mirroring method of the present invention is applied to a first device, which can be understood as the main screen of a car infotainment system. The first device includes a display screen, on which a graphical user interface is displayed. The graphical user interface includes at least one first touch identifier, where the first touch identifier can be used to indicate screen mirroring to a second device (screen mirroring to the co-pilot screen or the rear row screen).
[0038] Reference Figure 1 , is a flowchart of the screen mirroring method according to some embodiments of the present invention.
[0039] As Figure 1 shown, the screen mirroring method of the embodiments of the present invention may include the following steps:
[0040] S101, in response to the first touch identifier being triggered, determine the second device corresponding to the first touch identifier.
[0041] Specifically, when the first touch identifier is triggered, it can indicate that the first device starts screen mirroring to the second device, which can be understood as the co-pilot screen or the rear row screen.
[0042] Exemplarily, the first touch identifier can be designed in the interaction mode of a physical button. The button is usually associated with the function of screen mirroring to the second device, and users can quickly identify and use it; physical buttons may be more reliable than touchscreens in complex environments (such as wet hands or wearing gloves).
[0043] Exemplarily, the first touch identifier can also be designed in the interaction mode of a touchscreen. Users can operate by directly touching the icon on the screen, which can provide a clearer and more delicate visual experience. Users can perform more complex gesture operations, such as zooming and rotating. Further, touch operations usually provide instant feedback, such as vibration, sound or visual prompts, to enhance the user experience.
[0044] Exemplarily, the first touch identifier can also be designed in the interaction mode of voice, which allows users to interact with the device through natural language without manual operation. Users can complete the operation without touching the device. Voice input is usually faster than manual input and can improve the interaction efficiency.
[0045] S102, continuously capture the target screen displayed on the display screen of the first device to generate a target screen stream.
[0046] Specifically, the target screen (pixel data) displayed on the display screen of the first device is obtained in real time, and a target screen stream is generated according to the target screen displayed on the display screen of the first device.
[0047] Among them, the video stream refers to the transmission or playback of video content in a continuous streaming manner over a network without waiting for the entire video file to be downloaded. This technology allows users to download and play content simultaneously while watching a video, greatly reducing the waiting time and improving the user experience.
[0048] S103, map the target video stream to the display screen of the second device so that the display screen of the second device displays the target screen.
[0049] Specifically, after generating the target video stream, map the target video stream to the display screen of the second device so that the display screen of the second device can display the target screen shown on the display screen of the first device, thereby realizing the screen mirroring function of the first device and enabling all application programs in the intelligent cockpit system to be shared and displayed between the first device and the second device.
[0050] In some embodiments of the present invention, the graphical user interface further includes a second touch identifier; the above method further includes: in response to the second touch identifier being triggered, controlling the display of the first touch identifier on the graphical user interface.
[0051] Specifically, when the second touch identifier is triggered, it can indicate the activation of the screen mirroring function of the first device, and the activation of the screen mirroring function of the first device can be displayed on the graphical user interface of the display screen of the first device.
[0052] Exemplarily, the second touch identifier can be designed in the interaction mode of a physical button, and the button is usually associated with the function of turning on screen mirroring, and users can quickly identify and use it; physical buttons may be more reliable than touchscreens in complex environments (such as wet hands, wearing gloves).
[0053] Exemplarily, the second touch identifier can also be designed in the interaction mode of a touchscreen. Users can operate by directly touching the icon on the screen, which can provide a clearer and more delicate visual experience. Users can perform more complex gesture operations, such as zooming and rotating. Further, touch operations usually provide instant feedback, such as vibration, sound, or visual cues, to enhance the user experience.
[0054] Exemplarily, the second touch identifier can also be designed in the interaction mode of voice, which allows users to interact with the device through natural language without manual operation. Users can complete the operation without touching the device. Voice input is usually faster than manual input and can improve the interaction efficiency.
[0055] Specifically, referring to Figure 2 , it is a schematic diagram of the screen mirroring method according to some embodiments of the present invention. Multiple application programs do not need to separately implement the screen mirroring function, and only need to be unifiedly screen mirrored from the first device to the second device.
[0056] In some embodiments of the present invention, the above method further includes: retrieving an instance of ProjectionManager, creating a Projection object through the ProjectionManager instance, and creating a virtual screen through the Projection object; controlling the creation of a Presentation component on the display screen of the second device, and creating a Surface display control within the Presentation component, and binding the Surface display control to the virtual screen.
[0057] Specifically, assume that the first device (such as the main screen of a car head unit) needs to project its own screen content to the second device (such as the co-pilot screen or the rear screen). A virtual screen is created through ProjectionManager, and the content is displayed on the second device using the Presentation component. Retrieving an instance of ProjectionManager and creating a Projection object, then creating a virtual screen through the Projection object, creating a Presentation component on the second device, creating a Surface control in the Presentation component and binding it to the virtual screen, can be understood as defining a SurfaceView in presentation_layout.xml, obtaining the SurfaceView in the onCreate method of the Presentation and binding it to the virtual screen, and realizing the mapping and display of the video stream through the virtual screen and the Presentation component.
[0058] Among them, the ProjectionManager instance can be understood as a screen recording instance; the Projection object can be understood as a screen recording object; the Presentation component can be understood as a display component. Presentation is a multi-screen display application programming interface (API) provided by the Android system for displaying content on an external display device; the content of the virtual screen needs to be bound to the SurfaceView in the Presentation component, which is realized through SurfaceHolder.
[0059] As a specific embodiment, as Figure 3 shown, the flowchart of the screen projection method of the present invention may include the following steps:
[0060] S301, retrieve an instance of ProjectionManager.
[0061] S302, create a Projection object through the ProjectionManager instance.
[0062] S303, create a virtual screen through the Projection object.
[0063] S304, control to create a Presentation component on the display screen of the second device, and create a Surface display control within the Presentation component.
[0064] S305, bind the Surface display control to the virtual screen.
[0065] In some embodiments of the present invention, continuously capture the target screen displayed on the display screen of the first device to generate a target screen stream, including: continuously obtain the target data stream of the target screen displayed on the display screen of the first device through the Projection object, and obtain the corresponding target screen stream on the virtual screen according to the target data stream.
[0066] Specifically, through the Projection object, the target data stream of the target screen displayed on the display screen of the first device can be continuously obtained, which can be understood as the Projection object starts to record the content of the target screen displayed on the display screen of the first device, and the corresponding target screen stream can be obtained on the virtual screen according to the target data stream of the target screen. When implementing the screen mirroring function, it is necessary to render the screen content of the first device to the virtual screen of the second device, which means creating a SurfaceView and obtaining a SurfaceHolder, that is, defining a SurfaceView in the layout file of the Presentation component, and initializing the SurfaceView and obtaining the SurfaceHolder in the onCreate method of the Presentation. Create a virtual screen and bind the Surface, that is, in the first device, create a virtual screen through MediaProjection and pass the Surface object to the virtual screen, which can realize the real-time capture and streaming processing of the target screen.
[0067] In some embodiments of the present invention, map the target screen stream to the display screen of the second device so that the display screen of the second device displays the target screen, including: map the target screen stream to the Surface control through the virtual screen so that the display screen of the second device displays the target screen.
[0068] Specifically, after obtaining the target screen stream, map the target screen stream to the Surface control through the virtual screen, which can be understood as outputting the recording result of the Projection component to the corresponding Surface control of the virtual screen, so that the display screen of the second device displays the target screen displayed on the display screen of the first device, thereby realizing that all application programs can be shared and displayed between the first device and the second device.
[0069] In a multi-screen interaction scenario, it is necessary to dynamically bind the SurfaceView to the virtual screen, ensure that it is immediately passed to the rendering engine after the Surface is created, and avoid rendering failures caused by the unreadiness of the Surface. Create a SurfaceView and set the SurfaceHolder callback. Define the SurfaceView in the Presentation component and listen for the Surface creation event through SurfaceHolder.Callback. In the first device, create a virtual screen through MediaProjection and dynamically bind it after the Surface is created, enabling the mapping and display of the video stream from the virtual screen to the display screen of the second device.
[0070] In some embodiments of the present invention, the above method further includes: continuously monitoring the life cycle of the application started on the first device; wherein, the application corresponds to the target screen; in response to a change in the life cycle, controlling to hide the Presentation component on the second device to hide the target screen displayed on the display screen of the second device.
[0071] Specifically, in the case where certain applications cannot perform screen mirroring themselves, after the first device starts recording and screen mirroring, record the page information of the screen mirroring request initiated by the first device, and continuously monitor the change in the life cycle of the application started on the first device. The change in the life cycle can be understood as whether the application currently started on the first device exits or is cancelled. Among them, the screen displayed by the application corresponds to the target screen. When the life cycle changes, it can indicate that the application currently started on the first device exits or is cancelled. At this time, control to hide the Presentation component on the second device to hide the target screen displayed on the display screen of the second device, so that the first device stops screen mirroring, and can automatically control the screen mirroring display according to the application state, improving the user experience.
[0072] In some embodiments of the present invention, the graphical user interface further includes a third touch identifier; the above method further includes: in response to the third touch identifier being triggered, controlling to hide the Presentation component on the second device to hide the target screen displayed on the display screen of the second device.
[0073] Specifically, when the third touch identifier is triggered, it can indicate the cancellation of the screen mirroring function of the first device. The graphical user interface on the display screen of the first device can display the cancellation of the screen mirroring function of the first device. At this time, control to hide the Presentation component on the second device and release the resources related to the created virtual screen to hide the target screen displayed on the display screen of the second device, avoiding mirroring the screen displayed on the display screen of the first device to the display screen of the second device.
[0074] It should be noted that if you want to initiate the screen mirroring sharing function for an application started arbitrarily on the first device, then you can repeatedly execute the step of determining the second device corresponding to the first touch identifier in response to the first touch identifier being triggered.
[0075] Exemplarily, the third touch identifier can be designed in the interaction mode of a physical button. The button is usually associated with the function of canceling screen mirroring, and users can quickly recognize and use it; physical buttons may be more reliable than touchscreens in complex environments (such as wet hands, wearing gloves).
[0076] Exemplarily, the third touch identifier can also be designed in the interaction mode of a touchscreen. Users can operate by directly touching the icon on the screen, which can provide a clearer and more delicate visual experience. Users can perform more complex gesture operations, such as zooming and rotating. Further, touch operations usually provide instant feedback, such as vibration, sound, or visual cues, to enhance the user experience.
[0077] Exemplarily, the third touch identifier can also be designed in the interaction mode of voice, which allows users to interact with the device through natural language without manual operation. Users can complete the operation without touching the device. Voice input is usually faster than manual input and can improve the interaction efficiency.
[0078] For example, when monitoring the change in the life cycle of the application started on the first device, that is, during the process of screen recording and screen mirroring of the application on the first device (such as the Baidu application), the phone application on the first device suddenly starts, that is, a call comes in suddenly during the process of screen recording and screen mirroring on the first device. The first device will respond to the third touch identifier or the user actively cancels the screen recording and screen mirroring interface, which means that the target screen displayed on the current display screen of the first device will not appear on the second device, and the second device cannot receive the target screen displayed on the current display screen of the first device.
[0079] As a specific embodiment, as Figure 4 shown, the flowchart of the screen mirroring method of the present invention may include the following steps:
[0080] S401, determine the second device.
[0081] S402, the first device starts screen mirroring.
[0082] S403, the first device performs screen recording and screen mirroring.
[0083] S404, continuously monitor the life cycle of the application started on the first device.
[0084] S405, determine whether the life cycle has changed. If so, end the process; if not, execute step S406.
[0085] S406 determines whether the user actively exits screen mirroring. If so, end this process; if not, return to step S403.
[0086] In some embodiments, assuming that the interaction form of the touch identifiers is in the form of physical buttons, then the first touch identifier, the second touch identifier, and the third touch identifier correspond to 3 physical buttons, where each physical button corresponds one-to-one to each touch identifier; assuming that the interaction form of the touch identifiers is in the form of voice, then the first touch identifier, the second touch identifier, and the third touch identifier correspond to 3 voice commands. For example, the voice commands can be "determine the second device corresponding to the first touch identifier", "turn on the screen mirroring function of the first device", "hide the Presentation component on the second device"; assuming that the interaction form of the touch identifiers is in the form of a touch screen, then the first touch identifier, the second touch identifier, and the third touch identifier correspond to 3 icons on the display screen, where each icon on the display screen corresponds one-to-one to each touch identifier.
[0087] In summary, according to the screen mirroring method of the embodiments of the present invention, which is applied to a first device, the first device includes a display screen, and the display screen displays a graphical user interface, and the graphical user interface includes at least one first touch identifier; the above method includes: in response to the first touch identifier being triggered, determining the second device corresponding to the first touch identifier; continuously capturing the target screen displayed on the display screen of the first device to generate a target screen stream; mapping the target screen stream to the display screen of the second device so that the display screen of the second device displays the target screen. Thus, this method can enable application programs that require the screen mirroring function in the intelligent cockpit system not to create their own screen mirroring functions individually, enabling all application programs in the intelligent cockpit system to share the display between the main screen and the secondary screen or the rear screen, improving the user experience.
[0088] It should be noted that the method of the embodiments of the present invention can be executed by a single device, such as a computer or a server, etc. The method of this embodiment can also be applied to a distributed scenario and be completed by multiple devices cooperating with each other. In such a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiments of the present invention, and these multiple devices will interact with each other to complete the above method.
[0089] It should be noted that some embodiments of the present invention have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the above embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0090] Corresponding to the above embodiments, the present invention also provides a screen mirroring device.
[0091] As Figure 5 shown, the screen mirroring device according to an embodiment of the present invention includes: a response module 510, a capture module 520, and a screen mirroring module 530.
[0092] Among them, the response module 510 is configured to determine a second device corresponding to the first touch identifier in response to the first touch identifier being triggered; the capture module 520 is configured to continuously capture a target screen displayed on the display screen of the first device to generate a target screen stream; the screen mirroring module 530 is configured to map the target screen stream to the display screen of the second device so that the display screen of the second device displays the target screen.
[0093] In some embodiments of the present invention, the graphical user interface further includes a second touch identifier; the response module 510 is further configured to control the display of the first touch identifier in the graphical user interface in response to the second touch identifier being triggered.
[0094] In some embodiments of the present invention, the screen mirroring module 530 is further configured to retrieve a ProjectionManager instance, create a Projection object through the ProjectionManager instance, create a virtual screen through the Projection object; control the creation of a Presentation component on the display screen of the second device, and create a Surface display control within the Presentation component, and bind the Surface display control to the virtual screen.
[0095] In some embodiments of the present invention, the capture module 520 continuously captures the target screen displayed on the display screen of the first device to generate a target screen stream, specifically: continuously obtain the target data stream of the target screen displayed on the display screen of the first device through the Projection object, and obtain the corresponding target screen stream on the virtual screen according to the target data stream.
[0096] In some embodiments of the present invention, the screen mirroring module 530 maps the target video stream to the display screen of the second device, so that the display screen of the second device displays the target video. Specifically, it is configured to: map the target video stream to the Surface control through a virtual screen, so that the display screen of the second device displays the target video.
[0097] In some embodiments of the present invention, the response module 510 is further configured to continuously monitor the life cycle of the application started on the first device; wherein, the application corresponds to the target video; in response to a change in the life cycle, control the Presentation component on the second device to be hidden, so as to hide the target video displayed on the display screen of the second device.
[0098] In some embodiments of the present invention, the graphical user interface further includes a third touch identifier; the response module 510 is further configured to, in response to the third touch identifier being triggered, control the Presentation component on the second device to be hidden, so as to hide the target video displayed on the display screen of the second device.
[0099] It should be noted that for the details not disclosed in the screen mirroring device of the embodiments of the present invention, please refer to the details disclosed in the screen mirroring method of the embodiments of the present invention, and will not be elaborated herein.
[0100] In summary, the screen mirroring device according to the embodiments of the present invention includes: a response module configured to determine the second device corresponding to the first touch identifier in response to the first touch identifier being triggered; a capture module configured to continuously capture the target video displayed on the display screen of the first device to generate a target video stream; a screen mirroring module configured to map the target video stream to the display screen of the second device, so that the display screen of the second device displays the target video. Thus, this device enables the applications that require the screen mirroring function in the intelligent cockpit system not to create their own screen mirroring functions individually, and enables all applications in the intelligent cockpit system to share the display between the main screen and the secondary screen or the rear screen, improving the user experience.
[0101] For the convenience of description, when describing the above system, various modules are described separately according to their functions. Of course, when implementing the present invention, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0102] The system of the above embodiments is used to implement the corresponding method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated herein.
[0103] Corresponding to the above embodiments, the present invention also proposes an electronic device.
[0104] Reference Figure 6, a block diagram of an electronic device according to some embodiments of the present invention, showing a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a display screen 630; one or more processors 610; one or more memories 620; the display screen 630 is used to display a graphical user interface; one or more memories 620 are used to store one or more computer programs and data information; one or more of the computer programs include instructions; when the instructions are executed by one or more processors 610, the electronic device is caused to execute the steps of the above-mentioned screen mirroring method.
[0105] According to the electronic device of the embodiment of the present invention, by executing the above-mentioned screen mirroring method, it is possible to enable application programs that require the screen mirroring function in the intelligent cockpit system not to create their own screen mirroring functions individually, so that all application programs in the intelligent cockpit system can be shared and displayed between the main screen and the secondary screen or the rear screen, improving the user experience.
[0106] The electronic device of the above embodiment is used to implement the corresponding method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0107] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present invention also provides a computer-readable storage medium storing computer instructions for causing a computer to execute the method of any of the foregoing embodiments.
[0108] The above computer-readable storage medium may be any available medium or data storage device accessible by a computer, including but not limited to magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical discs (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSD)).
[0109] The computer instructions stored in the storage medium of the above embodiment are used to cause a computer to execute the method of any of the above exemplary method parts, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0110] In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart may be changed in the order of execution. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.
[0111] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0112] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present invention should have the ordinary meanings understood by those of ordinary skill in the art to which the present invention pertains. The "first", "second" and similar terms used in the embodiments of the present invention do not denote any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or items appearing before the term cover the elements or items listed after the term and their equivalents, without excluding other elements or items. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0113] Although the spirit and principles of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the specific embodiments disclosed, and the division of each aspect does not mean that the features in these aspects cannot be combined for benefits. This division is only for the convenience of expression. The present invention aims to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is given the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
Claims
1. A screen mirroring method, characterized in that Applied to a first device, the first device includes a display screen, and a graphical user interface is displayed on the display screen, and the graphical user interface includes at least one first touch identifier; The method includes: In response to the first touch identifier being triggered, determining a second device corresponding to the first touch identifier; Continuously capturing a target screen displayed on the display screen of the first device to generate a target screen stream; Mapping the target screen stream to the display screen of the second device so that the target screen is displayed on the display screen of the second device.
2. The screen mirroring method according to claim 1, wherein The graphical user interface further includes a second touch identifier; The method further includes: In response to the second touch identifier being triggered, controlling to display the first touch identifier in the graphical user interface.
3. The screen mirroring method according to claim 1, wherein The method further includes: Invoking a ProjectionManager instance, creating a Projection object through the ProjectionManager instance, and creating a virtual screen through the Projection object; Controlling to create a Presentation component on the display screen of the second device, and creating a Surface display control within the Presentation component, and binding the Surface display control to the virtual screen.
4. The screen mirroring method according to claim 3, wherein The continuously capturing a target screen displayed on the display screen of the first device to generate a target screen stream includes: Continuously obtaining a target data stream of the target screen displayed on the display screen of the first device through the Projection object, and obtaining a corresponding target screen stream on the virtual screen according to the target data stream.
5. The screen mirroring method according to claim 4, wherein The mapping the target screen stream to the display screen of the second device so that the target screen is displayed on the display screen of the second device includes: Mapping the target screen stream to the Surface control through the virtual screen so that the target screen is displayed on the display screen of the second device.
6. The screen mirroring method according to claim 5, wherein The method further includes: Continuously monitoring the life cycle of an application program started on the first device; wherein, the application program corresponds to the target screen; In response to the life cycle changing, controlling to hide the Presentation component on the second device to hide the target screen displayed on the display screen of the second device.
7. The screen mirroring method according to claim 5, wherein The graphical user interface further includes a third touch identifier; The method further includes: In response to the third touch identifier being triggered, controlling to hide the Presentation component on the second device to hide the target screen displayed on the display screen of the second device.
8. A screen mirroring device, characterized in that Applied to a first device, the first device includes a display screen, and a graphical user interface is displayed on the display screen, and the graphical user interface includes at least one first touch identifier; The device includes: A response module, configured to determine a second device corresponding to the first touch identifier in response to the first touch identifier being triggered; A capture module, configured to continuously capture a target screen displayed on the display screen of the first device to generate a target screen stream; The screen mirroring module is configured to map the target video stream to the display screen of the second device, so that the display screen of the second device displays the target video.
9. An electronic device, characterized in that, It includes: A display screen; One or more processors; One or more memories; The display screen is used to display a graphical 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 is caused to execute the steps of the screen mirroring method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A program or instructions are stored on the readable storage medium, and when the program or instructions are executed by a processor, the steps of the screen mirroring method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Online classroom screen projection method and device, electronic equipment and storage medium
CN111880756A
Automobile intelligent cabin multi-screen linkage method, system and device and storage medium
CN117170608A