Screen projection method and device, equipment and medium
By sending screen projection requests in the on-board system, creating a data buffer and establishing a screen projection data transmission channel, the multi-screen interaction problem between on-board systems is solved, and the application interface projection between different systems is realized, meeting the multi-screen interaction needs of on-board systems.
Patent Information
- Application Number
- CN202510539403.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, the multi-screen interaction requirements between vehicle-mounted systems have not been effectively solved, and it is difficult to achieve application interface projection between different systems.
By sending a screen projection request in response to the screen projection instruction, a data buffer is created to cache application data, and a screen projection data transmission channel between the first device and the second device is established. The screen projection middleware is used to coordinate the communication between Android and Linux systems to realize the transmission and display of application data.
It realizes that the application data on the first device is simply projected onto the second device, satisfying the multi-screen interaction capability of the on-board system and supporting information interaction between multiple screens.
Smart Images

Figure CN120447850A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and specifically to a screen projection method, device, equipment and medium. Background Art
[0002] Multi-screen interaction of in-vehicle systems is an important way of information interaction. It can display the same content on different screens, and can also project the interfaces of different system applications onto the physical screen of another system to achieve information interaction.
[0003] Some in-vehicle systems can simultaneously support four screen displays: the instrument screen, HUD (Head Up Display), the main driver's control screen (central control screen), and the co-driver's screen. However, there are many requirements for interaction between systems and screens, so it is necessary to design a method for projecting screens between different systems. Summary of the Invention
[0004] In view of the above-mentioned shortcomings of the prior art, the present application provides a screen projection method, device, equipment and medium for solving at least one defect in the prior art.
[0005] To achieve the above and other purposes, the present application provides a screen projection method, which includes:
[0006] In response to a screen projection instruction to project a target application of the first device to the second device, sending a screen projection request to the second device;
[0007] Upon receiving a screen projection response returned by the second device in response to the screen projection request, creating a data buffer to cache application data of the target application to obtain cached data, wherein the screen projection response is used to indicate that screen projection is allowed;
[0008] The cached data in the data buffer is sent to the second device, so that the target application is displayed based on the cached data through the second device.
[0009] In one embodiment of the present application, after the second device receives the screen projection request, the screen projection method further includes:
[0010] Connecting the first data transmission channel with the second data transmission channel through the screen projection middleware to establish a screen projection data transmission channel between the first device and the second device, so as to transmit application data of the target application from the first device to the second device through the screen projection data transmission channel;
[0011] Among them, the first data transmission channel is the data transmission channel between the first device and the screen projection middleware, and the second data transmission channel is the data transmission channel between the second device and the screen projection middleware.
[0012] In one embodiment of the present application, the screen projection method further includes: creating a virtual display screen based on the first screen projection parameters through the first device to render the target application on the virtual display screen to obtain application data of the target application.
[0013] In one embodiment of the present application, the second device displays the target application based on the cached data, including:
[0014] Through the second device, the cached data is parsed according to the second screen projection parameters to obtain the target application.
[0015] In one embodiment of the present application, the target application includes multiple applications, and the second device displays the target application based on the cached data, further including:
[0016] Determining a hierarchical relationship among layers of the target applications;
[0017] The plurality of target applications are displayed based on the hierarchical relationship.
[0018] In one embodiment of the present application, the target application includes multiple applications, and the screen projection method further includes: when creating a data buffer, creating multiple data buffers, each data buffer corresponding to one target application.
[0019] In one embodiment of the present application, the first device is an Android-based device, and the second device is a Linux-based device.
[0020] To achieve the above-mentioned and other related purposes, the present application provides a screen projection device, comprising:
[0021] a request sending module, configured to send a screen projection request to the second device in response to a screen projection instruction to project a target application of the first device to the second device;
[0022] a buffer creation module, configured to create a data buffer to cache application data of the target application to obtain cached data upon receiving a screen projection response returned by the second device in response to the screen projection request, wherein the screen projection response is used to indicate that screen projection is allowed;
[0023] A data transmission module is configured to send the cached data in the data buffer to the second device, so as to display the target application based on the cached data through the second device.
[0024] To achieve the above objectives and other related objectives, the present application provides a screen projection device, comprising:
[0025] one or more processors; and
[0026] The memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the memory implements the screen projection method.
[0027] To achieve the above-mentioned objectives and other related objectives, the present application provides one or more machine-readable media on which instructions are stored, which, when executed by one or more processors, enable the processor to execute the screen projection method.
[0028] Beneficial effects of this application:
[0029] A screen projection method of the present application includes: sending a screen projection request to the second device in response to a screen projection instruction to project a target application of a first device to a second device; upon receiving a screen projection response returned by the second device in response to the screen projection request, creating a data buffer to cache application data of the target application to obtain cached data, and the screen projection response is used to indicate that screen projection is allowed; sending the cached data in the data buffer to the second device to display the target application based on the cached data through the second device; the present application can simply project application data on the first device to the second device, thereby satisfying the multi-screen interaction capability of the in-vehicle system.
[0030] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0032] Figure 1 This is a flowchart of a screen projection method according to an embodiment of the present application;
[0033] Figure 2 This is a schematic diagram of a Linux and Android-based in-vehicle system according to an embodiment of the present application;
[0034] Figure 3 For an embodiment of this application Figure 3 A layer hierarchy diagram showing the screen projection from Android system to Linux system;
[0035] Figure 4 For an embodiment of this application Figure 4 This is a schematic diagram of the architecture of projecting the Android system onto the instrument panel (Linux system) according to an embodiment of the present application;
[0036] Figure 5 This is a block diagram of a screen projection device according to an embodiment of the present application;
[0037] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing the memory of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0038] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.
[0039] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0040] Although the terms "first," "second," "A," and "B," etc. may be used herein to describe various elements, these elements should not be limited by these terms and are merely used to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of the technology described below. The term "and / or" includes a combination of a plurality of related items or any of the plurality of related items.
[0041] As used herein, unless the context indicates otherwise, the singular form is intended to include the plural form, and it will be understood that the term "comprising" means the presence of stated features, quantities, steps, operations, elements, or combinations thereof, but does not preclude the presence or addition of one or more other features, quantities, steps, operations, elements, components, or combinations thereof.
[0042] Before describing the components in detail, it is intended to clarify that the components in this specification are divided only by the primary function of each component. That is, two or more components described below may be combined into one component, or may be divided into two or more components based on more detailed functions. In addition to the primary function of the component, each component described below may also perform some or all of the functions of other components, and some of the primary functions of each component may be exclusively performed by other components.
[0043] The following is an explanation of each noun.
[0044] Android is a free and open-source mobile operating system based on the Linux kernel (excluding GNU components). It is primarily used in mobile devices such as smartphones and tablets.
[0045] Android applications refer to applications that run on the Android operating system.
[0046] Linux system, an open source operating system, is widely used in servers, embedded devices and other fields. In this application, the Linux system is responsible for processing instructions from the Android application and performing specific operations such as hiding the projection layer or disconnecting the channel.
[0047] The Screencast SDK (SDK, short for Software Development Kit) is a set of tools and APIs for implementing screen sharing, helping developers quickly integrate screencasting capabilities. Developers can implement screencasting by calling its APIs (such as the resume() function).
[0048] Screen projection middleware is a type of software that sits between the operating system and the application. Its role is to coordinate communication between the Android application and the Linux system, ensuring the proper functioning of the screen projection function.
[0049] HMI (Human-Machine Interface) refers to the interface between users and machines. Instrument HMI applications here refer to applications running on Linux systems that manage and control instrument panel displays.
[0050] NativePresentInit() is a low-level initialization function, usually written in C++, used to establish the communication channel required for screen projection at the operating system level. It connects the Android system and the Linux system so that the two can exchange data.
[0051] BasePresentation, a base class for screen projection, is the core part of the screen projection SDK and is used to encapsulate the basic logic and functions of screen projection.
[0052] Surface, the display layer. In graphics programming, a Surface is an abstract concept used to draw images, typically representing a memory area used to store image data. It is the foundation for screen rendering and is used to transfer images to the target device during screen projection.
[0053] Presentation is the standard control for Google Cast, which is itself a Dialog. It creates a Presentation through the created virtual display VirtualDisplay.
[0054] BufferQueue, a queue structure, is used to store pending image frame data. During screen projection, each frame of the navigation app is placed in this queue, awaiting further processing and display by the screen projection middleware.
[0055] GraphicBuffer is a buffer used to store single-frame image data. Each frame is encapsulated into a GraphicBuffer object, which is then placed in a BufferQueue and ultimately displayed on the target device.
[0056] The embodiments of the present application respectively propose a screen projection method, a screen projection device, a screen projection equipment, and a computer-readable storage medium, and these embodiments will be described in detail below.
[0057] The screen projection method of the present application is applied to a screen projection device to project the application on the display screen of the first device in the vehicle-mounted system to one or more other screens. For example, the vehicle-mounted system includes multiple screens, such as an instrument screen, a HUD (Head Up Display), a main driver control screen (central control screen), and a co-driver screen. The main driver control screen can be the first device, and the instrument screen, HUD, and co-driver screen can be the second device. The first device and the second device constitute part of the vehicle-mounted system.
[0058] Figure 2 This is an in-vehicle system based on Linux and Android according to an embodiment of the present application. Figure 2 As shown, the Linux and Android-based in-vehicle system includes the Linux and Android systems, as well as the underlying GPU hardware. The GPU hardware provides image processing capabilities for the upper layers. Using a screen projection device, you can project the target application from the Android-based central control and entertainment information screen onto the Linux-based instrument panel, essentially mirroring the application from the display screen of one device to the display screen of a second device. Figure 3 This is a layer hierarchy diagram for projecting the screen from Android system to Linux system. Figure 3As shown, the layers include Linux system applications. The bottom layer is the instrument HMI layer, and the top layer is the alarm information layer. The lower the layer, the more easily obscured it is. The middle layer between the bottom and top layers is the display layer of the target application in the Android system after it is projected to the Linux system. Figure 4 This is a schematic diagram of the architecture of projecting the Android system onto the instrument screen (Linux system) according to an embodiment of the present application.
[0059] In the Android system, target applications that need to be projected, such as multimedia applications, will project music playback information on the instrument screen, navigation applications will project navigation intersection information on the instrument screen, and phone applications will project call time, contacts and other information on the instrument screen. These applications are projected to the display screen of the Linux system through the projection device (the projection device includes the projection SDK and projection middleware).
[0060] See also Figure 4 , Figure 4 This is a flowchart of a screen projection method according to an embodiment of the present application. The screen projection method is applied to a screen projection device, which is applied to a vehicle-mounted system. Figure 4 As shown, the screen projection method includes:
[0061] Step S410, in response to a screen projection instruction to project a target application of the first device to the second device, sending a screen projection request to the second device;
[0062] The target application refers to the specific application whose content the user wants to cast to another device, such as a video playback application, a game application, or an office application.
[0063] Among them, the first device and the second device are different devices, and both the first device and the second device run an operating system, and the running operating systems can be the same or different. For example, the operating system running on the first device is the Android system, and the system running on the second device is the Linux system. For a vehicle-mounted system including an instrument screen, a HUD (Head Up Display), a main driver control screen (central control screen), and a co-driver screen, the display screen of the first device can be the main driver control screen, and the display screen of the second device can be one or more of the instrument screen, HUD display, and co-driver screen. In one embodiment, the main driver control screen is used as the display screen of the first device, and the instrument screen is used as the display screen of the second device for explanation.
[0064] When a user needs to project a target application on the display screen of a first device to the display screen of a second device for display, the user can issue a projection instruction to the target application on the display screen of the first device, such as clicking a projection button or a voice projection instruction. The projection device can send a projection request to the second device in response to the projection instruction.
[0065] Step S420: upon receiving a screen casting response returned by the second device in response to the screen casting request, creating a data buffer to cache application data of the target application to obtain cached data, wherein the screen casting response is used to indicate that screen casting is allowed;
[0066] After receiving the screen projection request sent by the first device, the second device responds to the screen projection request and generates a screen projection response. The screen projection response includes allowing screen projection or not allowing screen projection. If the screen projection response allows screen projection, the screen projection device creates a data buffer for caching the application data of the target application. The data buffer is a block of memory allocated for the application data of the target application on the display screen.
[0067] Step S430: Send the cached data in the data buffer to the second device, so that the target application is displayed based on the cached data through the second device.
[0068] After the data buffer is created, the first device sends the cached data in the data buffer to the projection device. The second device then reads the cached data from the data buffer, parses the cached data, and obtains the target application that meets the display requirements of the second device. In this way, the target application on the display screen of the first device is displayed on the display screen of the second device.
[0069] Through the above solution, the present application can simply project the application data on the first device to the second device, thereby meeting the multi-screen interaction capability of the in-vehicle system.
[0070] In one embodiment, after the second device receives the screen projection request, the screen projection method further includes: connecting the first data transmission channel with the second data transmission channel through the screen projection middleware, establishing a screen projection data transmission channel between the first device and the second device, so as to transmit the application data of the target application from the first device to the second device through the screen projection data transmission channel; wherein, the first data transmission channel is the data transmission channel between the first device and the screen projection middleware, and the second data transmission channel is the data transmission channel between the second device and the screen projection middleware.
[0071] The first data transmission channel and the second data transmission channel are pre-established. The first data transmission channel and the second data transmission channel may include multiple channels, each of which has a channel identifier, and the data transmission channels can be distinguished by the channel identifier. The data transmission channel is used to transmit application data of the target application. The target application on the display screen of the first device is transmitted to the data buffer of the screen projection middleware through the first data transmission channel, and the cached data in the data buffer is transmitted to the second device through the second data transmission channel.
[0072] The screen projection request carries the application identifier of the target application, which is used to distinguish applications. For example, the application identifier of the navigation application is A, and the application identifier of the music playback application is B. Therefore, the applications can be distinguished by the application identifier. The first data transmission channel and the second data transmission channel can also be distinguished by the channel identifier. Taking the first data transmission channel as an example, for example, the channel identifier of the first channel is A1, and the channel identifier of the second channel is B1, the first data transmission channel is distinguished by the channel identifier. Taking the second data transmission channel as an example, for example, the channel identifier of the first channel is A2, and the channel identifier of the second channel is B2, the second data transmission channel is distinguished by the channel identifier. When the screen projection data transmission channel is pre-established, the corresponding first data transmission channel and the second data transmission channel will be associated. For example, the channel with channel identifier A1 is associated with the channel with channel identifier A2, and then associated with the application with application identifier A. The associated screen projection data transmission channel is used to transmit the application with application identifier A and related data. In this way, after the second device receives the screen projection request, it can determine the corresponding first data transmission channel and second data transmission channel based on the application identifier carried in the screen projection request and the pre-established association between the channel identifier and the application identifier, and then connect the first data transmission channel and the second data transmission channel through the screen projection middleware to determine the screen projection data transmission channel between the first device and the second device.
[0073] In one embodiment, the channel identifier may be the name of the application, and the application identifier may also be the name of the application, so that the data transmission channel can be easily associated with the application to be transmitted.
[0074] In one embodiment, a screen projection SDK is integrated into the first device. When projecting the target application, the first device creates a screen projection View, that is, a screen projection component presentationView; and then constructs a screen projection base class object BasePresentation based on some necessary parameters, such as the channel name ChannelName (application identifier) and pixel format. This screen projection base class object is part of the screen projection SDK and is used to encapsulate the basic logic and functions of screen projection. After the screen projection SDK completes the construction of the screen projection base class object BasePresentation, it will further call the screen projection middleware to perform lower-level operations and establish a screen projection communication channel (screen projection data transmission channel) between the first device and the second device, so that data can be exchanged between the first device and the second device.
[0075] After the projection data transmission channel between the first and second devices is established, the channel is initialized through the NativePresentInit() function. After initialization is complete, it indicates that the projection data transmission channel is successfully established. The projection middleware is responsible for receiving and transmitting the status information of the projection data transmission channel. If the status information indicates that the channel is successfully established, the projection middleware will send the successful creation status information to the projection SDK, which will trigger the success callback function onPresentationReady(Surface). If it fails, the current projection operation is terminated.
[0076] The target app to be projected will receive the projection SDK's callback function onPresentationStatus(String status). The status value of the callback function onPresentationStatus(String status) can be one of the following: unavailable (presentation_non), available (presentation_ready), in use (presentation_resumed), paused (presentation_paused), or disconnected (presentation_disconnected). If the status value of the callback function onPresentationStatus(String status) is available (presentation_ready), it indicates that the projection data transmission channel has been initialized and the projection SDK can initiate the projection.
[0077] In one embodiment, the screen projection method further includes: creating a virtual display screen based on the first screen projection parameters through the first device to render the target application on the virtual display screen to obtain application data of the target application.
[0078] After the screen projection data transmission channel is successfully established, the display manager DisplayManager of the first device creates a virtual display VirtualDisplay through the first screen projection parameters. The function of this virtual display VirtualDisplay is to "mirror" or "extend" the content from one device to another, such as projecting the mobile phone screen to the TV. In this way, the target application of the display screen of the first device can be rendered to the virtual display, thereby realizing the screen projection function. Among them, the first screen projection parameters include: the canvas Surface used to render the image, the width and height of the projection window, the pixel density of the screen, and the pixel format, etc.
[0079] When the first device initiates screen projection, the target application calls the resume() function of the projection SDK to update the target application to the display layer Surface created by the projection middleware, that is, to put the image frame of the target application into the queue structure BufferQueue of the projection middleware and fill the cache GraphicBuffer here.
[0080] If the target application is a navigation application, when the navigation application calls the resume() function of the screen casting SDK, the content on the navigation interface (such as maps, routes, etc.) will be displayed in real time on another device or screen. Specifically, the navigation application will be updated to a "display layer" created by the screen casting middleware. That is, the display content of the navigation application is put into a queue structure called "BufferQueue" frame by frame, and each image frame in the queue structure is carried and managed by "GraphicBuffer". The resume() function of the screen casting SDK will inform the second device of the address of the cached GrafficBuffer through the screen casting middleware. After obtaining the cached data, the second device will parse the data saved at the address of the GraphicBuffer and restore it to an image.
[0081] In one embodiment, the second device displays the target application based on the cached data, including: parsing the cached data according to the second projection parameters through the second device to obtain the target application.
[0082] After the first device transfers the target application's application data to the data cache, the second device reads the data from the data cache and parses it to obtain the target application that meets the second projection parameters. The second projection parameters include screen parameters such as the size, pixels, and resolution of the second device's display screen. In other words, the second device parses the cached data based on the display screen parameters.
[0083] In one embodiment, the target applications include multiple ones, and the second device displaying the target applications based on the cached data further includes: determining a hierarchical relationship between layers of the multiple target applications; and displaying the multiple target applications based on the hierarchical relationship.
[0084] When there are multiple target apps for screen projection, such as a navigation app, a music player, and a phone app, the display priority of each app must be determined first. The content of these apps is then stacked and displayed on the screen in order of display priority, ultimately presenting it to the user. Display priority is determined by the layer hierarchy, meaning that multiple target apps are displayed based on the layer hierarchy.
[0085] This application passes the address of the application image stream of the first device to the second device, and the second device restores the image stream in the address into an image, which not only saves memory but also can flexibly determine the display or hiding of the delivered layer and the relative position of each layer.
[0086] In one embodiment, the second device flips the image on the Y-axis.
[0087] In one embodiment, the target application includes multiple applications, and the screen projection method further includes: when creating a data buffer, creating multiple data buffers, each data buffer corresponding to one target application.
[0088] For example, if the target applications include a navigation application and a music player application, when creating a data buffer, a first data buffer and a second data buffer are created, the data of the navigation application is transferred to the first data buffer, and the data of the music player application is transferred to the second data buffer.
[0089] In one embodiment, the first device not only initiates screen projection, but also initiates the transmission of application data, the disconnection of the screen projection data transmission channel, and the hiding of the screen projection layer of the corresponding channel, through the screen projection SDK, the screen projection middleware, and then to the second device.
[0090] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0091] Figure 5 This is a block diagram of a screen projection device according to an embodiment of the present application. Figure 5 As shown, a screen projection device includes:
[0092] A request sending module 510 is configured to send a screen projection request to the second device in response to a screen projection instruction to project a target application of the first device to the second device;
[0093] The buffer creation module 520 is configured to create a data buffer to cache application data of the target application to obtain cached data when receiving a screen casting response returned by the second device in response to the screen casting request, wherein the screen casting response is used to indicate that screen casting is allowed;
[0094] The data transmission module 530 is configured to send the cached data in the data buffer to the second device, so as to display the target application based on the cached data through the second device.
[0095] It should be noted that the screen projection device provided in the above embodiment and the screen projection method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here. In actual application, the screen projection device provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0096] An embodiment of the present application also provides a screen projection device, including: one or more processors; and a memory for storing one or more programs, when the one or more programs are executed by one or more processors, the memory implements the screen projection method in the above embodiment.
[0097] Embodiments of the present application also provide one or more machine-readable media on which instructions are stored, which, when executed by one or more processors, enable the processors to execute the screen projection method in the above-mentioned embodiment.
[0098] Figure 6 FIG1 shows a schematic diagram of a computer system structure suitable for implementing a memory according to an embodiment of the present invention. It should be noted that Figure 6 The computer system of the memory shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0099] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage portion into the random access memory (RAM) 603, such as executing the method in the above embodiment. Various programs and data required for system operation are also stored in the RAM. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0100] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, and the like; an output section 607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 609 performs communication processing via a network such as the Internet. A drive 66 is also connected to the I / O interface 605 as needed. Removable media 611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 610 as needed, so that computer programs read therefrom can be installed into the storage section 608 as needed.
[0101] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for executing the aforementioned screen projection method. In such an embodiment, the computer program can be downloaded and installed from a network through a communication portion, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, various functions defined in the system of the present invention are performed.
[0102] It should be noted that the computer-readable medium shown in the embodiments of the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may, for example, be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM) 603, a read-only memory (ROM) 602, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0104] The units involved in the embodiments of the present invention may be implemented in software or hardware, and the units described may also be provided in a processor. In some cases, the names of these units do not limit the units themselves.
[0105] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer processor, the computer executes the screen projection method described above. The computer-readable storage medium may be included in the memory described in the above embodiments, or may exist separately and not be incorporated into the memory.
[0106] Another aspect of the present invention further provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the screen projection method provided in each of the above embodiments.
[0107] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, any equivalent modifications or alterations accomplished by a person of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be covered by the claims of this application.
Claims
1. A screen projection method, characterized in that: The screen projection method includes: In response to a screen projection instruction to project a target application of the first device to the second device, sending a screen projection request to the second device; Upon receiving a screen projection response returned by the second device in response to the screen projection request, creating a data buffer to cache application data of the target application to obtain cached data, wherein the screen projection response is used to indicate that screen projection is allowed; The cached data in the data buffer is sent to the second device, so that the target application is displayed based on the cached data through the second device.
2. The screen projection method according to claim 1, wherein: After the second device receives the screen projection request, the screen projection method further includes: Connecting the first data transmission channel with the second data transmission channel through the screen projection middleware to establish a screen projection data transmission channel between the first device and the second device, so as to transmit application data of the target application from the first device to the second device through the screen projection data transmission channel; Among them, the first data transmission channel is the data transmission channel between the first device and the screen projection middleware, and the second data transmission channel is the data transmission channel between the second device and the screen projection middleware.
3. The screen projection method according to claim 2, wherein: The screen projection method also includes: creating a virtual display screen based on the first screen projection parameters through the first device, and rendering the target application on the virtual display screen to obtain application data of the target application.
4. The screen projection method according to claim 1, wherein: The second device displays the target application based on the cache data, including: Through the second device, the cached data is parsed according to the second screen projection parameters to obtain the target application.
5. The screen projection method according to claim 1, wherein: The target application includes a plurality of applications, and the second device displays the target application based on the cache data further including: Determining a hierarchical relationship among layers of the target applications; The plurality of target applications are displayed based on the hierarchical relationship.
6. The screen projection method according to claim 1, wherein: The target applications include multiple ones, and the screen projection method further includes: when creating a data buffer, creating multiple data buffers, each data buffer corresponds to one target application.
7. The screen projection method according to claim 1, wherein: The first device is an Android-based device, and the second device is a Linux-based device.
8. A screen projection device, characterized in that: The screen projection device includes: a request sending module, configured to send a screen projection request to the second device in response to a screen projection instruction to project a target application of the first device to the second device; a buffer creation module, configured to create a data buffer to cache application data of the target application to obtain cached data upon receiving a screen projection response returned by the second device in response to the screen projection request, wherein the screen projection response is used to indicate that screen projection is allowed; A data transmission module is configured to send the cached data in the data buffer to the second device, so as to display the target application based on the cached data through the second device.
9. A screen projection device, characterized in that: include: one or more processors; and A memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the memory implements the screen projection method as described in any one of claims 1 to 7.
10. A machine-readable medium, characterized in that Instructions are stored thereon, which, when executed by one or more processors, enable the processors to execute the screen projection method as described in any one of claims 1-7.